2013-06-21 72 views
3

我一直在努力让NUnit测试类工作,我在VS2012下通过Resharper 7.1.2使用NUnit 2.6.2。 我遇到的问题是,当我运行/调试测试用例时,NUinit无法找到任何要测试的项目程序集。这似乎是所有的DLL都在测试应用程序的调试文件夹中,但测试应用程序没有找到它们。 使用融合日志我得到错误日志显示此: -NUnit测试错误'无法加载文件或程序集''

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><!-- saved from url=(0015)assemblybinder: --></head><body><pre>*** Assembly Binder Log Entry (21/06/2013 @ 08:46:43) *** 

The operation failed. 
Bind result: hr = 0x80070002. The system cannot find the file specified. 

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll 
Running under executable C:\Program Files (x86)\JetBrains\ReSharper\v7.1\Bin\JetBrains.ReSharper.TaskRunner.CLR4.exe 
--- A detailed error log follows. 

=== Pre-bind state information === 
LOG: DisplayName = PbakConnectAssy, Version=1.0.0.0, Culture=neutral, `enter code here`PublicKeyToken=null 
(Fully-specified) 
LOG: Appbase = file:///C:/Program Files (x86)/JetBrains/ReSharper/v7.1/Bin/ 
LOG: Initial PrivatePath = NULL 
LOG: Dynamic Base = NULL 
LOG: Cache Base = NULL 
LOG: AppName = JetBrains.ReSharper.TaskRunner.CLR4.exe 
Calling assembly : (Unknown). 
=== 
LOG: This bind starts in default load context. 
LOG: Using application configuration file: C:\Program Files (x86)\JetBrains\ReSharper\v7.1\Bin\JetBrains.ReSharper.TaskRunner.CLR4.exe.Config 
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. 
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/JetBrains/ReSharper/v7.1/Bin/PbakConnectAssy.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/JetBrains/ReSharper/v7.1/Bin/PbakConnectAssy/PbakConnectAssy.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/JetBrains/ReSharper/v7.1/Bin/PbakConnectAssy.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/JetBrains/ReSharper/v7.1/Bin/PbakConnectAssy/PbakConnectAssy.EXE. 
LOG: All probing URLs attempted and failed. 

</pre></body></html> 

我完全难倒,所以任何帮助,将不胜感激。

回答

0

将您测试项目的目标平台更改为x86。

更新:在Visual Studio的2012年尝试运行更新ReSharper的到7.1.3版本时

也有是在ReSharper的7.1.2的错误。

这里有一个相关的问题:Resharper Test Runner: Could not load file or assembly 'System.Windows'

+0

它已经设置为x86。 – Pete

+0

在我的答案中增加了更多信息。尝试更新ReSharper。 – rpeshkov

+0

更新Resharper没有什么区别,我很害怕。 – Pete

0

我得到了同样的错误,但是当我跑VS以管理员身份就得到解决。

相关问题