C# PCL+UWP - Failed to load "System" assembly

2

I've got a project which has a Portable Class Library as "back-end" and a Universal Windows app for "front-end". Here is my repo at GitHub: huming2207/Rmiter

My target settings for the PCL library is "portable46-net451+win81", also the screenshot shows below:

pcl-target-settings

When running the app it stuck at the beginning, showing a System.IO.FileLoadException from the backend PCL library, as below:

System.IO.FileLoadException: 'Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'

...and here is the screenshot (in case if someone misunderstand my words):

exception

But meanwhile I can see there was a "System.Runtime.dll" loaded when the app starts. But why it still throw exceptions later on?

systemruntime-shows-up

I've searched and checked for quite a lot of similar issues and workarounds. But it seems that neither of them help at all.

c#
.net
uwp
windows-10
windows-10-universal
asked on Stack Overflow Mar 6, 2017 by Jackson Ming Hu • edited May 21, 2018 by GEOCHET

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0