C#-UWP应用程序:无法加载文件或程序集’System.Runtime.WindowsRuntime,版本= 4.0.14.0
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了C#-UWP应用程序:无法加载文件或程序集’System.Runtime.WindowsRuntime,版本= 4.0.14.0,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2002字,纯文字阅读大概需要3分钟。
内容图文
![C#-UWP应用程序:无法加载文件或程序集’System.Runtime.WindowsRuntime,版本= 4.0.14.0](/upload/InfoBanner/zyjiaocheng/949/7a36e93ee4ea46c9b532704c994abf31.jpg)
我有一个使用Xamarin的.Net Standard 1.4构建的UWP应用程序,我最近升级了几个nuget插件,而我的UWP项目已经开始给我以下错误:
“System.IO.FileLoadException: Could not load file or assembly
‘System.Runtime.WindowsRuntime, Version=4.0.14.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089′. The located assembly’s manifest
definition does not match the assembly reference. (Exception from
HRESULT: 0x80131040)\r\n”
现在通常这很简单,您只需添加对该.dll的引用即可.所以我找到nuget包here并将其添加到我的UWP项目中并进行构建.
现在最初在nuget软件包页面上,我看不到版本4.0.14,但无论如何我都安装了最新版本(4.3.0).
但是我仍然遇到相同的错误,当我检查bin文件夹中该库的版本时,它报告为V4.0.12,那么我从哪里可以得到该库的V4.0.14?
额外信息
我可以在互联网上找到的此版本的DLL的唯一提及是here
The update was only was published as part of
Microsoft.NETCore.UniversalWindowsPlatform and you have to target Fall
Creator’s Update or higher for the APIs I have listed above. That gets
you the following version of the assembly (4.0.3.0 is the latest
standalone):System.Runtime.WindowsRuntime, Version=4.0.14.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089So scratch .NET 4.6.1 and .NET Core 2.0- only Universal Windows
Platform 10.0.16299 for now.
解决方法:
因此,该版本的库尚未作为独立软件包发布.
获取该库的唯一方法是将目标版本和最低版本提交给Fall Creators Update(如提及的here)
The update was only was published as part of
Microsoft.NETCore.UniversalWindowsPlatform and you have to target Fall
Creator’s Update or higher for the APIs I have listed above. That gets
you the following version of the assembly (4.0.3.0 is the latest
standalone):System.Runtime.WindowsRuntime, Version=4.0.14.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
这是由于(我的情况)我将插件Rg.Popup更新到1.1.3.73-pre版本引起的,因为它们使用的API的一部分在早期版本的Windows中不可用.我也将其作为针对Rg.Popup插件here的错误报告进行了归档.
我敢肯定,微软将把这个版本作为单独的软件包发布
澄清一下-将目标版本和最低版本从Windows 10 Build 10240更改为秋季创建者更新已为我解决了此问题
内容总结
以上是互联网集市为您收集整理的C#-UWP应用程序:无法加载文件或程序集’System.Runtime.WindowsRuntime,版本= 4.0.14.0全部内容,希望文章能够帮你解决C#-UWP应用程序:无法加载文件或程序集’System.Runtime.WindowsRuntime,版本= 4.0.14.0所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。