Best way to build/test 64 bit version of our software?


I currently have builds that compile and test a mixed managed/unmanaged .NET assembly, targeting x86. This works fine on all build agents, regardless of whether they are installed on 32 or 64 bit Windows.

I've created another build that targets x64. The compiles the code fine, but the tests fail with a BadImageFormatException. This seems to be because the build agent is running under WOW and therefore is expecting a 32 bit assembly.

I have a couple of questions:

1) What do I have to do to get the build agent running natively under 64 bit?
2) Is there a way to allow an agent running on 64 bit windows to run both 32 bit tests (under WOW) and 64 bit tests natively?


1 comment
Comment actions Permalink

I've figures this out, so I thought I'd summarise what I found because it wasn't obvious to me and someone else may find the info useful:

1) The build agent does not need to run under the 64 bit JRE
2) Our tests are run using the teamcity nunitlauncher, which simply needs to know which platform to target - x86, x64 or MSIL - as described at


Please sign in to leave a comment.