gpt4 book ai didi

c# - UWP App Start 抛出异常 : 'System.Exception' in mscorlib. ni.dll

转载 作者:太空宇宙 更新时间:2023-11-03 12:44:04 24 4
gpt4 key购买 nike

因此,当我启动我的 UWP 应用程序时,我会短暂地看到启动画面,然后在以下位置引发异常:

mscorlib.ni.dll!System.RuntimeTypeHandle.GetTypeByName(string name, bool throwOnError, bool ignoreCase, bool reflectionOnly, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool loadTypeFromPartialName) mscorlib.ni.dll!System.RuntimeType.GetType(string typeName, bool throwOnError, bool ignoreCase, bool reflectionOnly, ref System.Threading.StackCrawlMark stackMark) mscorlib.ni.dll!System.Type.GetType(string typeName, bool throwOnError) mscorlib.ni.dll!System.Resources.ResourceManager.GetWinRTResourceManager() mscorlib.ni.dll!System.Globalization.CultureInfo.GetCultureInfoForUserPreferredLanguageInAppX() mscorlib.ni.dll!System.Globalization.CultureInfo.CurrentCulture.get() mscorlib.ni.dll!System.IO.FileLoadException.FormatFileLoadExceptionMessage(string fileName = "System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", int hResult) mscorlib.ni.dll!System.IO.FileNotFoundException.SetMessageField() mscorlib.ni.dll!System.IO.FileNotFoundException.FileNotFoundException(string fileName, string fusionLog, int hResult)

除了“抛出的异常:mscorlib.ni.dll 中的‘System.Exception’”之外,没有其他详细信息。

运行不同的 UWP 应用程序(例如 UWP 空白模板应用程序)工作正常,但这个应用程序似乎特别有这个问题。

我可以使用我的应用程序的缩减版本重现该问题,如果需要的话可以是 downloaded here .

最佳答案

原来我的应用程序包已损坏或其他原因,所以我从 [%localappdata%\packages] 中删除了该程序包。您可以在打包部分下的包 list 中找到您的包名称。

我通过查找我在事件查看器中遇到的错误来解决这个问题,Microsoft 的 KB 说我应该在机器上重新创建我的用户帐户,以便我得到一个新的包文件夹。但我发现只需删除项目的包即可解决问题。

关于c# - UWP App Start 抛出异常 : 'System.Exception' in mscorlib. ni.dll,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37960616/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com