How to change "Visual Studio 2017" folder location?

(Starring this question because I'm going to need this answer for the next release of Visual Studio, I bet... And I forget this every time I set up a new machine. I cobbled this together last time from a bunch of different sites, but unfortunately my google-fu cannot find them again, so my sincerest gratitude to those unnamed developers.)


Finally, a question I can answer! I, too, have spent countless hours trying to fix this. The commenter on your question is correct--the settings are still controlled by the same registry keys, it's just that the location of those has been moved following the switch to a different installer. Lo and behold:

  • Previously, Visual Studio installed many registry keys into the system’s HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER hives under a Visual Studio-specific key:
    • HKLM\Software\Microsoft\VisualStudio\Version: [...]
    • HKCU\Software\Microsoft\VisualStudio\Version: [...]
    • HKLM\Software\Microsoft\VisualStudio\Version_Config: [...]
  • To reduce the impact on the registry, Visual Studio now uses the RegLoadAppKey function to store registry keys in a private binary file under %VsAppDataFolder%\privateregistry.bin. [...]

So in essence, what you need to do is to find that file, load it in a registry editor (such as regedit.exe), change the values to your liking, and then save the file in the same format. On my machine, the file was located in:

C:\Users\Ernest\AppData\Local\Microsoft\VisualStudio\15.0_dfee2c30

Not censoring my username 'cause it's pretty obvious anyway. The following is how to use regedit.exe to do the editing:

First, select somewhere to load the registry hive (I used HKEY_USERS). It doesn't really matter as long as you don't overwrite something when loading the hive (it will warn you). With that key selected, go to File > Load Hive..., and open the aforementioned privateregistry.bin file. Type in a Key Name to load it under (e.g. "VS2017_config"), and you'll see the familiar keys used in past versions to configure paths. Change those. When you're finished, select the hive which you loaded (e.g. "VS2017_config"), and go to File > Unload Hive.... This should set folder paths correctly.


Do note that those folders will pop up again the first time you use Visual Studio Blend, so remember to change those as well if you ever plan on using that.

Edit: The corresponding registry hive for Blend was here for me:

C:\Users\Ernest\AppData\Local\Microsoft\Blend\15.0_dfee2c30


Edit 2018: @ofthelit has kindly posted an official page with the relevant info.


Or (in Visual Studio 2017) just go to tools >> options >> projects and solutions >> Locations

enter image description here