我一直在努力讓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>
我完全難倒,所以任何幫助,將不勝感激。
它已經設置爲x86。 – Pete
在我的答案中增加了更多信息。嘗試更新ReSharper。 – rpeshkov
更新Resharper沒有什麼區別,我很害怕。 – Pete