I have a solution with a bunch of projects, some of which also have test projects. These are all compiled for the Any CPU
platform.
In TeamCity, I have a build configuration for NUnit 2.6.4, on which I specify Platform: auto (MSIL)
and Version: 4.0
.
When I run the build, the tests fail with the following message:
NUnit error running tests in 'C:\BuildAgent\work\a58fc6cd9bf63032\JsonApi.Tests\obj\Release\JsonApi.Tests.dll' assembly
Loading assembly is compiled for v4.0.30319, MSIL
NUnit runner runtime is v4.0.30319, x64
Even stranger, when I just now switched off "Run recently failed tests first" (and changed nothing else), I instead got the following:
NUnit error running tests in 'C:\BuildAgent\work\a58fc6cd9bf63032\JsonApi.Owin.Tests\obj\Release\JsonApi.Owin.Tests.dll' assembly
Loading assembly is compiled for v4.0.30319, MSIL
NUnit runner runtime is v4.0.30319, x86
Note that in one case, the runner is x86, while in the other it's x64. In neither case, do they successfully load an assembly compiled for MSIL.
I assume something is off with my build settings here, but what?