【发布时间】:2022-07-01 16:34:48
【问题描述】:
我正在使用 MAUI 和 Visual Studio 2022 Preview 开发应用程序。
当我在我的 Windows 笔记本电脑上运行时,好的。
此外,如果我在 Android 设备上点击并启动该应用程序(没有调试),它会正常运行。
但是当我在我的物理 Android 设备上运行调试时,它会抛出这个异常:
$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
[monodroid-assembly] open_from_bundles: failed to load assembly pt/System.Private.CoreLib.resources.dll
**System.IO.FileNotFoundException:** ''
[monodroid-assembly] open_from_bundles: failed to load assembly pt/System.Private.CoreLib.resources.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Serialization.Primitives.dll
[monodroid-assembly] open_from_bundles: failed to load assembly pt-BR/System.Private.DataContractSerialization.resources.dll
**System.IO.FileNotFoundException:** ''
[monodroid-assembly] open_from_bundles: failed to load assembly pt-BR/System.Private.DataContractSerialization.resources.dll
如何解决?
【问题讨论】:
-
我发现如果我点击Continue几次,那么应用程序就会在Debug模式下运行。
-
您检查的“公共语言运行时运行时异常”将使您的项目引发 CLR 引发的每个异常。您无需了解所有这些例外情况。在同一个“异常设置”窗口中,您有一个“将列表恢复为默认设置”的按钮
标签: maui-blazor