Freigeben über


Run MSTest.exe as a native 64-bit process.

If you need to run MS Test command line utility as a 64-bit process you need to do 2 things:

Disclaimer: Be aware that this is not supported and it is under you own risk.

1. Backup the MSTest.exe file first and then remove the 32-bit flag by running the CorFlags.exe utility as:

    CorFlags.exe MSTest.exe /32BIT- /Force

2. Run your test with /noisolation switch to run tests within the MSTest.exe process and avoid using 32-bit only VSTestHost.exe

   MSTest.exe /testcontainer:<your assembly> /resultsfile:results.trx /noisolation

And optionally, if MSTest.exe fails because the 32-bit flag was modified, you may want to skip the strong name verification:

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\MSTest,b03f5f7f11d50a3a /f

Comments

  • Anonymous
    March 28, 2009
    PingBack from http://blog.a-foton.ru/index.php/2009/03/29/run-mstestexe-as-a-native-64-bit-process/

  • Anonymous
    February 11, 2011
    Does Visual Studio 2010 support 64 bit mstest.exe officially?

  • Anonymous
    November 01, 2012
    I tried adding the registry key. Still it fails for the same "strong name verification" reason. I am running Windows 7 x64. Please help.

  • Anonymous
    January 08, 2014
    In Visual Studio 2013 you can set the architecture under the Test menu somewhere and it works without any of these kluges.