BadImageFormatException when AnyCPU test assembly implements interface from x64 production assembly

I came here searching for the solution for a similar problem. Posting this answer just in case the solution I found helps someone else.
This solved it for me in Visual Studio (2012):

Add New Item -> Test Settings Add Test Setting Item
Change the testsetting Run test in 64 bit process
By default this is set to “Force test to run in 32 bit process”

From the menu:
Test -> Test Settings -> Select Test Settings File -> Choose the test settings file you have created.

Now run the tests.

Leave a Comment

techhipbettruvabetnorabahisbahis forumueduseduseduseduedueduseduedueduedus