简体   繁体   中英

Windows Universal App: Could not load file or assembly - The located assembly's manifest definition does not match the assembly reference

I'm trying out the new Windows Universal App and I can't get it working with a .net API necessary for the app. The API in question is for a software our company uses called Moraware .

I can build a C# Classic Desktop Windows Form App for .Net 4.6, reference the .dll and it works without a problem.

When I write a C# Universal App, it builds fine, but when I do anything with the API like Connection.GetJob(12345), I get the following error:

Could not load file or assembly 'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b743552344e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I tried adding System.Xml as a reference, but I get the error: A reference to System.XML.dll could not be added. This component is already automatically referenced by the build system.

I also added the Microsoft .NET Core Runtime Package for Windows, and the Windows Desktop Extensions for the UWP, but nothing changed.

Any ideas on how I can get this api working with a Universal Windows App?

I guess the referenced library is not a Portable Class Library and itselfs refers a full .Net Framework System.XML. This assembly is not available to the UWP loader or if also loaded not compatible with the .Net SDK distributed with UWP (.Net Core based).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

Related Question Could not load file or assembly. The located assembly's manifest definition does not match the assembly reference Could not load file or assembly: The located assembly's manifest definition does not match the assembly reference Could not load file or assembly XXX or one of its dependencies. The located assembly's manifest definition does not match the assembly reference Could not load file or assembly 'MySql.Data, Version=8.0.29.0.. The located assembly's manifest definition does not match the assembly reference Could not load file or assembly 'WebGrease' one of its dependencies. The located assembly's manifest definition does not match the assembly reference Could not load file or assembly or one of its dependencies. The located assembly's manifest definition does not match the assembly reference Could not load file or assembly. The located assembly's manifest definition does not match the assembly reference. Version conflict The located assembly's manifest definition does not match the assembly reference “The located assembly's manifest definition does not match the assembly reference” Could not load file or assembly 'System.Web.Mvc' or one of its dependencies. The located assembly's manifest definition does not match the assembly
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM