Skip to content

Exception being thrown on android physical device with latest version of .NET MAUI #7002

Description

@vsfeedback

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-publishingIssues with the app packaging/publishing process (ipk/apk/msix/trimming)s/needs-infoIssue needs more info from the authort/bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions