I want run my visual studio in 64 bit mode

那年仲夏 提交于 2019-12-08 03:41:50

问题


I am writing my web service in .NET 3.5, in this I have to access SharePoint 2010 data, but SharePoint requires 64-bit mode for my application. Visual Studio by default in 32-bit mode. How can I run my Visual Studio 2013 in 64-bit?

This is what my task manager shows:

I think I need this to be 64-bit, what should I do now?


回答1:


Visual Studio itself is a 32-bit application and cannot be run in "64-bit mode". However, Visual Studio can create both 32-bit and 64-bit applications and the debugger can connect to both types of executables .

There is no need for Visual Studio to run in a specific mode to do so, but it must run on a 64-bit capable computer, running the 64-bit version of windows.

It may be that your Visual Studio Project should be set to 64-bit or to AnyCPU for you to connect to SharePoint. To do so, set the target platform of the project as described here.

  1. On the menu bar, choose Build, Configuration Manager.
  2. In the Active solution platform list, choose a 64-bit platform for the solution to target, and then choose the Close button.

    1. If the platform that you want doesn’t appear in the Active solution platform list, choose New. The New Solution Platform dialog box appears.
    2. In the Type or select the new platform list, choose x64.
    3. If you want to copy the settings from a current platform configuration, choose it, and then choose the OK button.

Note:

If you give your configuration a new name, you may have to modify the settings in the Project Designer to target the correct platform.

The properties for all projects that target the 64-bit platform are updated, and the next build of the project will be optimized for 64-bit platforms.




回答2:


I'm not sure VS actually can run as 64-bit, however you can run unit tests as a 64 bit process:

Running a unit test as a 64-bit process

To run a unit test as a 64-bit process

If your code or tests were compiled as 32-bit/x86, but you now want to run them as a 64-bit process, recompile them as Any CPU, or optionally as 64-bit.

Tip: For maximum flexibility, you should compile your test projects with the Any CPU configuration. Then you can run on both 32 and 64 bit agents. There is no advantage to compiling test projects with the 64-bit configuration.

From the Visual Studio menu, choose Test, then choose Settings, and then choose Processor Architecture. Choose x64 to run the tests as a 64-bit process.

or

Specify x64 in a .runsettings file. An advantage of this method is that you can specify groups of settings in different files and quickly switch between different settings. You can also copy settings between solutions. For more information, see Configuring Unit Tests by using a .runsettings File.

Taken from: http://msdn.microsoft.com/en-us/library/ee782531.aspx



来源:https://stackoverflow.com/questions/27686462/i-want-run-my-visual-studio-in-64-bit-mode

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