maui: Exception being thrown on android physical device with latest version of .NET MAUI
This issue has been moved from a ticket on Developer Community.
When I attempt to run my .NET MAUI application on a physical device, I’m getting hit with the following exception
$exception {System.IO.FileNotFoundException:
File name: 'System.Private.CoreLib.resources'
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext)
at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(Assembly assembly, CultureInfo culture, Version version, Boolean throwOnFileNotFound)} System.IO.FileNotFoundException
If I enabled the CLR debug, it’s revealing more
[monodroid-assembly] open_from_bundles: failed to load assembly System.Text.RegularExpressions.dll
Loaded assembly: /data/data/com.companyname.compencrypt/files/.__override__/System.Text.RegularExpressions.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly en-GB/System.Private.CoreLib.resources.dll
[monodroid-assembly] open_from_bundles: failed to load assembly en-GB/System.Private.CoreLib.resources.dll
**System.IO.FileNotFoundException:** 'Loading...'
[monodroid-assembly] open_from_bundles: failed to load assembly en-GB/System.Private.CoreLib.resources.dll
[monodroid-assembly] open_from_bundles: failed to load assembly en-GB/System.Private.CoreLib.resources.dll
[monodroid-assembly] open_from_bundles: failed to load assembly en/System.Private.CoreLib.resources.dll
[monodroid-assembly] open_from_bundles: failed to load assembly en/System.Private.CoreLib.resources.dll
The error shows in App.xaml.cs when the InitialiseComponent is called and if I try to access anything in my Languages.Resources file or use DI to access platform specific code. On an emulator, the code works as expected.
Using .NET MAUI 6.0.300-rc.2.5513
Original Comments
Feedback Bot on 4/30/2022, 09:39 PM:
(private comment, text removed)
Original Solutions
(no solutions)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 23 (11 by maintainers)
Is this resolved then or do we still have something to do here? 😃