UWP application: Could not load file or assembly 'System.Runtime.WindowsRuntime, Version=4.0.14.0

user1

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: 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"

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.

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

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?

Extra Info

The only mention of this version of the dll I can find on the internet is 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

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

user1

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

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

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

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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related