3

I've been struggling to get an NUnit test class to work, I using NUnit 2.6.2 via Resharper 7.1.2 under VS2012. The problem that I'm having is that when I run/debug a test case NUinit is unable to find any of the project assemblies that are to be tested. It would appear that all the dll's are in the debug folder for the test app, but the test app is not finding them. Using Fusion logs I get error logs showing this:-

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

I'm completely stumped, so any help would be appreciated.

Pete
  • 31
  • 1
  • 2

2 Answers2

0

Change Target Platform of you test project to x86.

Update:

Also there is a bug in ReSharper 7.1.2 when running on Visual Studio 2012. Try to update ReSharper to version 7.1.3.

Here's a related question: Resharper Test Runner: Could not load file or assembly 'System.Windows'

Community
  • 1
  • 1
rpeshkov
  • 4,877
  • 3
  • 27
  • 43
0

I got the same error, but it is resolved when I ran VS as Administrator.

user1145404
  • 285
  • 1
  • 3
  • 9