UWP应用程序:无法加载文件或程序集'System.Runtime.WindowsRuntime,版本= 4.0.14.0 [英] UWP application: Could not load file or assembly 'System.Runtime.WindowsRuntime, Version=4.0.14.0

查看:456
本文介绍了UWP应用程序:无法加载文件或程序集'System.Runtime.WindowsRuntime,版本= 4.0.14.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 .Net Standard 1.4 Xamarin 构建的UWP应用程序,我最近升级了几个nuget插件和我的 UWP 项目已经开始给我以下错误:

I have a UWP application built using .Net Standard 1.4 using Xamarin I have recently upgraded a couple of my nuget plugins and my UWP project has started giving me the following error:


System.IO.FileLoadException:无法加载文件或程序集
'System.Runtime.WindowsRuntime,版本= 4.0.14.0,区域性=中性,
PublicKeyToken = b77a5c561934e089'。找到的程序集清单
定义与程序集引用不匹配。(
HRESULT的异常:0x80131040)\r\n

"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包,并将其添加到我的UWP项目中,并

Now usually this is quite straight forward, you just add a reference to that .dll. So I find the nuget package here and add it to my UWP project and build.

现在最初在nuget软件包页面上,我看不到版本 4.0.14 ,但我安装了最新版本(4.3.0)。

Now initially on the nuget package page I cant see a Version 4.0.14 but I install the latest (4.3.0) anyway.

但是我仍然遇到相同的错误,并且当我检查 bin 文件夹时该库的版本报告为 V4.0.12 ,那么我从哪里获得该库的V4.0.14?

But I still get the same error and when I check the bin folder for the version of that library it reports V4.0.12 so where do I get the V4.0.14 of this library from?

其他信息

我在互联网上可以找到的该版本dll的唯一提及是此处

The only mention of this version of the dll I can find on the internet is here


此更新仅作为
Microsoft.NETCore.UniversalWindowsPlatform的一部分发布,并且您必须针对我列出的API定位Fall
Creator's Update或更高版本e。这将为
您提供以下版本的程序集(4.0.3.0是最新的
独立版本):

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,版本= 4.0.14.0,Culture = neutral,
PublicKeyToken = b77a5c561934e089

System.Runtime.WindowsRuntime, Version=4.0.14.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

因此只刮擦.NET 4.6.1和.NET Core 2.0-通用Windows
平台10.0.16299暂时。

So scratch .NET 4.6.1 and .NET Core 2.0- only Universal Windows Platform 10.0.16299 for now.


推荐答案

因此该库的版本尚未发布

So this version of the library has not been released as an independent package.

获得此库的唯一方法是将目标版本和最低版本放入秋季创作者更新此处

The only way you can get this library is to put your Target Version and Min Version to Fall Creators Update as mentioned here


此更新仅作为
Microsoft.NETCore.UniversalWindowsPlatform的一部分发布,您必须针对Fall
Creator's Update或更高版本的API我已经在上面列出了。这将为
您提供以下版本的程序集(4.0.3.0是最新的
独立版本):

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,版本= 4.0.14.0,Culture = neutral,
PublicKeyToken = b77a5c561934e089

System.Runtime.WindowsRuntime, Version=4.0.14.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

这是由于更新插件引起的 Rg.Popup 到1.1版我猜测是.3.73-pre,因为它们使用的API的一部分在早期版本的Windows中不可用。我也已将此文件作为针对Rg.Popup插件的错误报告提交了此处

This is caused (in my case) by updating the plugin Rg.Popup to version 1.1.3.73-pre I'm guessing because they use part of the API that isn't available in an earlier build of windows. I have also filed this as a bug report against the Rg.Popup plugin here

我敢肯定,微软将这个版本作为单独的软件包发布

I'm pretty sure it's down to microsoft to release that version as a seperate package

澄清-将目标版本和最低版本从Windows 10 Build 10240更改为秋季创建者更新会为我解决此问题

To clarify - changing the Target version and min version from Windows 10 Build 10240 to fall creators update fixed the issue for me

这篇关于UWP应用程序:无法加载文件或程序集'System.Runtime.WindowsRuntime,版本= 4.0.14.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆