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