Reputation: 187
I am working on a C# UWP
application, but I have a version error that I need help fixing. I am trying to get this application working on 2 Raspberry Pis, a Windows 10 phone, and a Windows 10 laptop. It works on one Raspberry Pi only right now, but that tells me it should work. I understand the error, just not how to fix it with UWP.
Execution action failed. System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.WindowsRuntime, Version=4.0.11.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
My phone is on Windows 10586
My laptop is on 14986
Pi1 is on 14393.448
Pi2 is on 14393.576 - WORKS HERE
With UWP apps, the entire core framework is automaticaly referenced and not listed or accessible, it does not show under references or even in the csproj file when opened in a text editor.
I am needing some extensions that are in the System.Runtime.WindowsRuntime for TOTP stuff (byte[] to IBuffer and IBuffer to byte[]).
I would appreciate whatever suggestions anyone has on fixing this.
Upvotes: 0
Views: 1232
Reputation: 1789
I got this error also, and found it was due to the fact that my main project contained this:
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>**5.0.0**</Version>
</PackageReference>
But when I added a Background Task to the solution, it picked up this:
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>**6.0.1**</Version>
</PackageReference>
When I edited the new project to match the rest of my solution then things start working properly. Odd that VS would allow this when it results in a runtime error...
Upvotes: 0
Reputation: 187
An version change to Microsoft.NETCore.UniversalWindowsPlatform from Nuget happened at some point and got things out of sync on different devices.
Upvotes: 2