Change “Visual Studio 2010” folder location

妖精的绣舞 提交于 2019-11-27 11:48:44

问题


I would like to change the "Visual Studio 2010" folders location to my Dropbox folder, so it gets synced every time I make a change. I have searched on the internet, but haven't found a solution yet.

Is it possible to change the "Visual Studio 2010" folders location from within Visual Studio 2010, specifically Visual C# Express 2010?


回答1:


Tools > Options > Projects and Solutions > General > "Projects location" setting. Change the others too if you routinely create templates.




回答2:


If you want to relocate everything in the Visual Studio 2010 folder, it takes a couple steps:

  1. In Visual Studio, go to Tools > Options > Projects and Settings > General. Set the three locations as desired.
  2. In Registry Editor, navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0. Set the remaining locations that still reference Documents\Visual Studio 2010 as desired.



回答3:


As stated by the other answers, some of the paths are configurable (settings, default projects location, and the user template locations) and can be set under Tools->Options. However, it is important to note that the actual registry value that determines the root path is at HKCU\Software\Microsoft\VisualStudio\12.0\VisualStudioLocation, and that this value is only taken into account if HKCU\Software\Microsoft\VisualStudio\12.0\MyDocumentsLocation is set correctly.

To change these registry keys properly:

  1. Make sure Visual Studio is not running.
  2. Open the registry editor and first make sure that HKCU\Software\Microsoft\VisualStudio\12.0\MyDocumentsLocation is set to your actual My Documents location (this is very important, otherwise some of the other paths in the registry will take on default values on the next open/close cycle) and does not have a trailing slash. If this registry value is not there, you must add it.
  3. Change the HKCU\Software\Microsoft\VisualStudio\12.0\VisualStudioLocation to whatever path you'd like the files to be stored at.
  4. (Optional, but recommended) Search for more references to the old path in the registry under both 12.0 and 12.0_Config and update them accordingly.

Note that if you ever change the location of My Documents in Windows, several of the paths (including VisualStudioLocation, which most of the others are based on) will revert to their defaults, and you'll have to follow the steps above again.

(Modify the Visual Studio version number as applicable -- 12.0 is for VS2013, 11.0 for VS2012, etc.)




回答4:


HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\NewProjectDialog\MRUSettingsVenusProjectLocationEntries

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\NewProjectDialog\MRUSettingsLocalProjectLocationEntries

if above solution doesnt work try this ones.




回答5:


From Tools Option> projects and Solution as show down




回答6:


In case someone come across this question these days, in VS2017 Community there is a "Location" node under Tools-> Options-> Projects and Solutions-> Locations. The fields are no longer under "General".



来源:https://stackoverflow.com/questions/6395057/change-visual-studio-2010-folder-location

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