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

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

问题描述

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

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:无法加载文件或程序工具,版本= 1.2.0.200,区域性=中性公钥= 764d581291d764f7'或它​​的一个依赖。找到的程序集清单定义不匹配程序集引用。 (异常来自HRESULT:0x80131040)**

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)**

在x.Foo.FooGO()

at x.Foo.FooGO()

在x.Foo.Foo2(字符串groupName_)在Foo.cs:行123

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

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

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

System.IO.FileLoadException:无法加载文件或程序工具,版本= 1.2.0.203,区域性=中性公钥= 764d581291d764f7'或它​​的一个依赖。找到的程序集清单定义不匹配程序集引用。 (异常来自HRESULT:0x80131040)

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)

我看在我引用和我只有一个参考 Utility版本1.2.0.203 (另一种是旧)。

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

我如何找出尝试引用旧版本这个DLL的任何建议?

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

另外,我不认为我什至有我的硬盘驱动器上这个老总成。
有没有寻找这个老版本装配任何工具?

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?

推荐答案

.NET程序集加载器无法找到1.2.0.203,但没有找到一个1.2.0.200。该组件不匹配请求什么,所以你得到这个错误。简单地说,它无法找到所引用的程序集。确保它可以通过把它在GAC或应用程序的路径找到合适的装配。另请参阅<一个href=\"http://blogs.msdn.com/junfeng/archive/2004/03/25/95826.aspx\">http://blogs.msdn.com/junfeng/archive/2004/03/25/95826.aspx.

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天全站免登陆