简体   繁体   English

Windows Universal App:无法加载文件或程序集-找到的程序集的清单定义与程序集引用不匹配

[英]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. 我正在试用新的Windows Universal App,但无法使用该应用程序必需的.net API来工作。 The API in question is for a software our company uses called Moraware . 有问题的API用于我们公司使用的称为Moraware的软件

I can build a C# Classic Desktop Windows Form App for .Net 4.6, reference the .dll and it works without a problem. 我可以为.Net 4.6构建C#经典桌面Windows窗体应用程序,引用.dll,它可以正常工作。

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: 当我编写C#通用应用程序时,它可以正常运行,但是当我使用Connection.GetJob(12345)之类的API进行任何操作时,都会出现以下错误:

Could not load file or assembly 'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b743552344e089' or one of its dependencies. 无法加载文件或程序集'System.Xml,版本= 2.0.0.0,文化=中性,PublicKeyToken = b743552344e089'或其依赖项之一。 The located assembly's manifest definition does not match the assembly reference. 找到的程序集的清单定义与程序集引用不匹配。 (Exception from HRESULT: 0x80131040) (来自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. 我尝试添加System.Xml作为引用,但出现错误:无法添加对System.XML.dll的引用。 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. 我还为Windows添加了Microsoft .NET Core运行时程序包,并为UWP添加了Windows桌面扩展,但没有做任何更改。

Any ideas on how I can get this api working with a Universal Windows App? 关于如何使此api与Universal Windows App一起使用的任何想法?

I guess the referenced library is not a Portable Class Library and itselfs refers a full .Net Framework System.XML. 我猜引用的库不是可移植类库,它本身是指完整的.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). 该程序集不适用于UWP加载程序,或者如果加载的程序也与UWP分发的.Net SDK不兼容(基于.Net Core)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法加载文件或程序集。 定位的程序集的清单定义与程序集引用不匹配 - 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 无法加载文件或程序集XXX或其依赖项之一。 找到的程序集的清单定义与程序集引用不匹配 - Could not load file or assembly XXX or one of its dependencies. The located assembly's manifest definition does not match the assembly reference 无法加载文件或程序集 'MySql.Data, Version=8.0.29.0.. 找到的程序集的清单定义与程序集引用不匹配 - 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 无法加载文件或程序集“WebGrease”的依赖项之一。 定位的程序集的清单定义与程序集引用不匹配 - 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” 无法加载文件或程序集“System.Web.Mvc”或其依赖项之一。 定位的程序集的清单定义与程序集不匹配 - 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