Is there a setting to force the Resharper 7.1 Test Runner to run in a 64-bit process?

I am currently using Resharper 7.1 C# Edition Build  I have a question about running unit tests built with the MSTest framework in Visual Studio 2012 installed on Windows 7 Professional 64-bit.

All of our test projects target Any CPU, though we have a runtime dependency on 64-bit unmanaged assemblies, specifically the 64-bit ODAC components.

When I run my unit tests with the Visual Studio test runner, I configure the Default Processor Architecture to X64 and my unit tests that depend on the 64-bit Oracle assemblies execute successfully because the VS test runner is running in a 64-bit process.

However, when I run those same unit tests with the Resharper 7.1 test runner, all the unit tests that reference the Oracle.DataAccess assembly (which depends on 64-bit unmanaged assemblies) throw the following exception:

System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Obviously, Resharper does not detect that the test runner should run in a 64-bit process. Is there any way I can force Resharper to run in a 64-bit process, without changing the target platform to 64-bit?

Comment actions Permalink

Hello Terri,

ReSharper Unit Test runner is run in 64-bit mode if:
1) Target Platform for a project (in project properties) is set for 'x64' direclty, and
2) It is running in a 64-bit OS.

In case both requirements are done, R# should run tests un 64-bit mode.

Hope this helps.

Comment actions Permalink


I am facing the same issue. I have the Resharper 8.1 and I am trying to run my tests on a x64 bit architecture. I have an x64 processor and my target platform is set to x64 but I am getting the

Error: System.BadImageFormatException.

I cant use any other architecture but x64. Is there an issue with this? When i run my test using visual studio test explore, it runs fine. It is only when i  use the resharper one that I get this error.


Comment actions Permalink

Is the *test* project marked as x64? Also, all assemblies that it needs to reference need to be either AnyCpu or x64. Are there any more messages with the exception? Stack Trace that could point to the culprit?


Please sign in to leave a comment.