22

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?

Drew Gaynor
  • 8,292
  • 5
  • 40
  • 53
BlackVoid
  • 627
  • 1
  • 6
  • 21

6 Answers6

39

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.
Edward Brey
  • 40,302
  • 20
  • 199
  • 253
  • In my experience, Visual Studio makes all the changes necessary in the registry, so manual edits are unadvisable. The only exception to this is the `FileMRUList` folder and the `ProjectMRUList`, which can be manually edited if you want your "Open Recent Projects" list to point to the new path. – kmote Oct 23 '13 at 16:42
  • Boo for Microsoft -- why not make all these setting configurable? Great post, though. – MrMas Mar 30 '16 at 18:38
21

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

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
8

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.)

Cameron
  • 96,106
  • 25
  • 196
  • 225
  • I successfully used this for VS2015, but it seems these registry keys are no longer used for VS2017. Any thoughts where to find these settings for VS2017? – TecMan Mar 10 '17 at 07:48
  • @TecMan: Nope, no idea. Still on VS2015 here. – Cameron Mar 13 '17 at 15:18
0

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.

Erdinç
  • 267
  • 2
  • 7
  • 15
0

From Tools Option> projects and Solution as show downenter image description here

David Fawzy
  • 1,056
  • 15
  • 17
0

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".

enter image description here

makoshichi
  • 2,310
  • 6
  • 25
  • 52