【问题标题】:Xamarin forms UWP: Exception thrown: 'System.TypeLoadException' in System.Private.CoreLib.ni.dllXamarin 形成 UWP:抛出异常:System.Private.CoreLib.ni.dll 中的“System.TypeLoadException”
【发布时间】:2019-04-02 07:53:28
【问题描述】:

更新 xamarin 表单后出现以下异常。

抛出异常:System.Private.CoreLib.ni.dll 中的“System.TypeLoadException” System.Private.CoreLib.ni.dll 中出现“System.TypeLoadException”类型的异常,但未在用户代码中处理 无法从程序集“Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null”加载类型“Xamarin.Forms.Xaml.XamlResourceIdAttribute”。

从 2.5.0.121934 安装 xamarin forms 3.1.0.912540 后我遇到了这个问题。

截图添加如下:

【问题讨论】:

  • "Version=2.0.0.0" 肯定是错误的。也许this helps.
  • clean bin/obj folders 关闭IDE后
  • 您可以使用 Visual Studio 安装程序来安装 .NET Framework 4.7.1。它是一个软件框架,而不是 nuget 包。NuGet 是一个免费的开源包管理器。
  • 你可以试试,我就是这样解决的。

标签: xamarin.forms typeloadexception


【解决方案1】:

xamarin 论坛已经报告了这个问题,the solution 是

  • 清理解决方案中的所有项目
  • 关闭 Visual Studio
  • 从所有项目中删除所有 bin 和 obj 文件夹(共享和特定于设备(Android、iOS、UWP))
  • 重启 IDE,构建解决方案。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-10-10
  • 1970-01-01
  • 2018-06-27
  • 1970-01-01
相关资源
最近更新 更多