question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:23 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
jfversluiscommented, Jun 29, 2022

Is this resolved then or do we still have something to do here? 😃

0reactions
msftbot[bot]commented, Jul 4, 2022

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MAUI Blazor App raises an Exception when running on ...
MAUI Blazor App raises an Exception when running on Debug mode on physical Android device ... I am developing an App using MAUI...
Read more >
.NET MAUI Dns.GetHostEntry()/Socket.Connect() exception on ...
I have a .NET MAUI implementation of System.Net.Sockets that runs fine on Windows, but when run on Android 10, the call to Dns.GetHostEntry("GAI-W10-Dev1"); ......
Read more >
PackageManager
Extend by device; Build apps that give your users seamless experiences from ... Get the latest; Stay in touch with the latest releases...
Read more >
Telerik UI for .NET MAUI (version 5.2.0)
[Android] Exception was thrown when using AddSingleton approach in a Shell app. PdfProcessing. NEW. Handled invalid /NULL name encoding for ...
Read more >
Is Maui dead on arrival? : r/dotnet
I've been building with MAUI + Blazor for the last 2 months and I find it to be an equivalent experience to normal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found