Question

After upgrading Resharper to version 6.1, when I try to run my unit tests using the Resharper test runner I get a pop-up dialog that complains about the test assembly having a BadImageFormatException. How do I get Resharper to run my unit tests?

Was it helpful?

Solution

The problem is that the Resharper test runner expects the test assembly to have the same image format as the test runner itself. The test runner is an x86 application, so this problem can occur when your test assembly is an x64 assembly. The solution is therefore simple: change your test assembly's project properties to build in x86 format. For more details, see this url: http://www.justjuzzy.com/2012/01/resharper-6-1-unit-test-runner-failed-to-load-test-assembly/

OTHER TIPS

Use a testsettings file in your solution to specify the test architecture. This can be added using Visual Studios "Add Item" from the context menu. In the new file Specify "Run tests in 64 bit process on 64 bit machine" in the Hosts section.

For detailed information refer to Microsoft's documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top