(这适用于我团队中的其他人,所以很可能与我的机器设置有关.)
我正在使用NUnit GUI测试运行器.当我使用File/Open Project加载测试程序集时,出现错误.
该项目是使用Visual Studio 2005构建的,Visual Studio的"关于"框将.NET框架版本作为2.0.50727 SP2.
这是我得到的错误:
装配不加载
System.BadImageFormatException:无法加载文件或程序集'Tests,Version = 0.0.0.0,Culture = neutral,PublicKeyToken = null'或其依赖项之一.尝试加载格式不正确的程序.您可能正在尝试加载使用CLR的更高版本构建的程序集,而不是NUnit当前运行的版本(2.0.50727)或尝试将64位程序集加载到32位进程中.
我刚刚使用了装配绑定日志查看器(Fuslogvw.exe)来查看融合日志,这就是显示我的内容,它没有任何意义,因为我告诉它要查看所有绑定.
*** Assembly Binder Log Entry (05/11/2010 @ 11:55:26) ***
The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
Running under executable C:\Program Files (x86)\NUnit 2.5.7\bin\net-2.0\nunit.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = KSSRETAIL\ian.ringrose
LOG: DisplayName = System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
(Fully-specified)
LOG: Appbase …
Run Code Online (Sandbox Code Playgroud)