MidhuN
MidhuN

Reputation: 423

Unit test not running in TFS build Release|x64 platform

I have created unit test for my solution in which all projects are in 64 bit. The unit test is also 64 bit. When I try to run this in my local machine it is working fine. But when I use this in TFS build it says the unit test dll cannot be loaded..

Then I changed the Platform for unit test to AnyCPU and TFS build to Release|AnyCPU. This time when I run unit test via TFS build I am getting bad image exception for the assembly which I am unit testing.. I am not able to find a solution for this.

Upvotes: 2

Views: 1265

Answers (1)

Eddie Chen - MSFT
Eddie Chen - MSFT

Reputation: 29976

Add a .runsettings file to your project and specify <TargetPlatform>x64</TargetPlatform> in it, and then configure to use the .runsettings file when you run the unit testing during the build.

See this article for details: Run a unit test as a 64-bit process.

Upvotes: 1

Related Questions