Run tests in 64-bit

杀马特。学长 韩版系。学妹 提交于 2019-12-18 05:43:14

问题


I got a ADO.NET driver which is compiled as 64-bit. I therefore need to run mstests in 64-bit mode. Is that possible?

(the dev machine is 64bit).


回答1:


Visual Studio has a built in option for this. It was a bit hard to find (if you do not know where to look).

Doubleclick on the local.testsettings file in Solution Explorer and select Hosts in the listbox. Then change as the image shows.

You must do your tests in a 64-bit OS and your application should be compiled with AnyCPU.




回答2:


Try the solution described in this blog post:

  1. Backup mstest.exe and run CorFlags.exe MSTest.exe /32BIT- /Force to remove the 32-bit flag
  2. Run your tests with /noisolation: MSTest.exe /testcontainer:<your-assembly> /resultsfile:<your-results-file> /noisolation
  3. If MSTest.exe fails after modification, run reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\MSTest,b03f5f7f11d50a3a /f to skip strong name verification



回答3:


It is easier in Visual studio 2013. Select Test->Test Settings->Default Processor Architecture->x64 before running the tests



来源:https://stackoverflow.com/questions/5880337/run-tests-in-64-bit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!