maui: MAUI Blazor: System.IO.FileNotFoundException: '' on InitializeComponent()
Description
My Maui Blazor App on InitializeComponent() is throwing System.IO.FileNotFoundException: ‘’ on Visual Studio, even if I uncheck “Break when this exception type is thrown”

dotnet workload list
ID da carga de trabalho instalada Versão do Manifesto Origem da Instalação
------------------------------------------------------------------------------------
wasm-tools-net6 7.0.3/7.0.100 VS 17.6.33513.286
maccatalyst 16.2.1030/7.0.100 VS 17.6.33513.286
ios 16.2.1030/7.0.100 VS 17.6.33513.286
wasm-tools 7.0.3/7.0.100 VS 17.6.33513.286
maui-android 7.0.59/7.0.100 VS 17.6.33513.286
maui-windows 7.0.59/7.0.100 VS 17.6.33513.286
maui-maccatalyst 7.0.59/7.0.100 VS 17.6.33513.286
android 33.0.26/7.0.100 VS 17.6.33513.286
maui-ios 7.0.59/7.0.100 VS 17.6.33513.286
Use `dotnet workload search` para encontrar cargas de trabalho adicionais a serem instaladas.
Steps to Reproduce
Open the project in repository, run Debugging on Android device.
Link to public reproduction project repository
https://github.com/TonyHenrique/bug-2023-03-21
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
Android 11.0 - API 30
Did you find any workaround?
No, because even if I uncheck “Break when this exception type is thrown” Visual Studio still stops at that line and I have to click the Continue button a few times.
Relevant log output
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (9 by maintainers)
Duplicate of #7443
So I think the issue is related to satellite assemblies:
In this case, the
XmlReaderjust happens to hit the same problem as: https://github.com/dotnet/maui/issues/7443Let me close this as duplicate, I’ll link to your example.
I don’t have a physical Android device but I’m paging Mr. @jonathanpeppers to see if perhaps this is familiar.
@jonathanpeppers - does anything in this call stack look like any known issue with XAML on a physical Android device? (Doesn’t repro on emulator, and a trivial app does not repro anywhere.)
Full repro app here: https://github.com/TonyHenrique/bug-2023-03-21
@Eilon, this only happens when I Run (Debug) on the physical Android device (HMD Global Nokia 5.3 (Android 12.0 - API 31)):
System.IO.FileNotFoundExceptionThis is what appears when I click “Show Call Stack” link button:
If I click the “Show External Code” button:
Can you please try this on an real physical Android phone?
If I run the App on the emulator (Nexus 5X - API 31), the error does not occur, as you noticed:
Hi @TonyHenrique I cloned your app and ran it and did not see any exceptions at all. I ran the
MauiBlazorApp1project in the Android Emulator and it worked fine:If you’re still seeing the exception, can you click “Show Call Stack” so that we can see more details about the exception you’re seeing?