How can I default VS Test Processor Architecture to x64?

穿精又带淫゛_ 提交于 2019-12-03 00:55:42

On Visual Studio 2013 I found that after setting "Default Process Architecture" to X64 I'll go and open "Options..." and close it with "OK", then the "Default Process Architecture" will preserved, at least for this one solution.

UPDATE FOR VS2017:

It seems that after opening the solution, when you click on the “Test Explorer” tab in Visual Studio, this rebuilds your tests. The “Run Test(s)” and “Debug Test(s)” menus become visible and enabled, as well as the checkbox next to previously selected “x64” option also gets restored.

The "Default Processor Architecture" menus option selected still seem to be cleared on close down of Visual Studio but the above action does seem re-select the previously selected option.

UPDATE FOR VS2015:

To ensure your test projects run at x64 please do the following:

  • Select 'Build' and then 'Configuration Manager' from the toolbar
  • Set Platform to x64 for your test project
  • If x64 isn't present select 'New' and add x64. You can now select it

Then...

  • Right-click your test project from the solution explorer and select 'Properties'

  • Select the 'Build' tab on the left

  • Change the Target Platform to x64

Note that you might get BadImageFormatExceptions if you are targetting a different platform for your live project. For example if Project1 is x86 and your Project1Test is targetting x64 you will likely come across this issue. You'll need to make sure both are matching (or just select 'Any CPU').

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