找到的程序集的清单定义与程序集引用不匹配 [英] The located assembly's manifest definition does not match the assembly reference

查看:198
本文介绍了找到的程序集的清单定义与程序集引用不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在C#Windows窗体应用程序(Visual Studio 2005)中运行一些单元测试,并且我收到以下错误:


System.IO.FileLoadException:无法加载文件或程序集Utility,Version = 1.2.0.200,Culture = neutral,PublicKeyToken = 764d581291d764f7或其一个依赖项。找到的程序集的清单定义与程序集引用不匹配。 (来自HRESULT的异常:0x80131040)** x.Foo.FooGO()



在x处



Foo.cs中的Foo.Foo2(String groupName_):第123行



在FooTests.cs中的x.Foo.UnitTests.FooTests.TestFoo():行98 **



System.IO.FileLoadException:无法加载文件或程序集Utility,Version = 1.2.0.203,Culture = neutral,PublicKeyToken = 764d581291d764f7或其一个依赖项。找到的程序集的清单定义与程序集引用不匹配。 (HRESULT的异常:0x80131040)


我查看我的引用,我只引用了实用程序版本1.2.0.203 (另一个是旧)。



有关我如何弄清楚是什么是试图引用这个旧版本的建议这个DLL文件?



此外,我不认为我甚至在我的硬盘上有这个旧的程序集。
是否有任何工具可以搜索这个旧版本的程序集?

解决方案

.NET程序集加载程序无法找到1.2.0.203,但确实发现了1.2.0.200。此程序集与请求不匹配,因此您收到此错误。简单来说,它找不到引用的程序集。确保它可以通过将其放在GAC或应用程序路径中找到正确的程序集。另请参阅 http://blogs.msdn.com/junfeng/archive /2004/03/25/95826.aspx


I am trying to run some unit tests in a C# Windows Forms application (Visual Studio 2005), and I get the following error:

System.IO.FileLoadException: Could not load file or assembly 'Utility, Version=1.2.0.200, Culture=neutral, PublicKeyToken=764d581291d764f7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)**

at x.Foo.FooGO()

at x.Foo.Foo2(String groupName_) in Foo.cs:line 123

at x.Foo.UnitTests.FooTests.TestFoo() in FooTests.cs:line 98**

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

I look in my references, and I only have a reference to Utility version 1.2.0.203 (the other one is old).

Any suggestions on how I figure out what is trying to reference this old version of this DLL file?

Besides, I don't think I even have this old assembly on my hard drive. Is there any tool to search for this old versioned assembly?

解决方案

The .NET Assembly loader is unable to find 1.2.0.203, but did find a 1.2.0.200. This assembly does not match what was requested and therefore you get this error. In simple words, it can't find the assembly that was referenced. Make sure it can find the right assembly by putting it in the GAC or in the application path. Also see http://blogs.msdn.com/junfeng/archive/2004/03/25/95826.aspx.

这篇关于找到的程序集的清单定义与程序集引用不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆