문제

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?

도움이 되었습니까?

해결책

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/

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top