In Visual Studio (I'm using 2010) is there a way to change which folder pops up by default when you go to open a file?
In Visual Studio (I'm using 2010) is there a way to change which folder pops up by default when you go to open a file?
For Visual Studio 2017 and 2019 you'll have to navigate from Tools->Options (Alt+T, O) then Projects and Solutions->Locations, there are 3 Locations but you will only need to edit the Projects location and click OK. No need to restart VS.
The only way I could configure Visual Studio 2019 Professional was through the "Developer Command Prompt for VS 2019" with vsregedit.exe as explained in this post. Adding to the windows registry didn't work.
Among the windows registry entries for VS2015 in HKCU\Software\Microsoft\VisualStudio\14.0, there used to be these:
DefaultFileOpenLocation
DefaultOpenProjectLocation
DefaultOpenProjItemLocation
DefaultOpenSolutionLocation
DefaultNewProjectLocation
DefaultNewProjItemLocation
VisualStudioLocation
VisualStudioProjectsLocation
You can change any of these keys using vsregedit. Some of these can be changed from the interface, in Tools->Options, Projects and Solutions->Locations or through the Git Settings for the Default Repository Location. The ones I had to change through vsregedit were:
DefaultFileOpenLocation
DefaultNewProjItemLocation
DefaultOpenProjItemLocation
You can read the current values with:
vsregedit read local HKCU "" DefaultNewProjItemLocation string
The output is something like:
Name: DefaultNewProjItemLocation, Value: %USERPROFILE%\source\repos
To change the values, you can use:
vsregedit set local HKCU "" DefaultFileOpenLocation string "C:\Visual Studio Projects"
vsregedit set local HKCU "" DefaultNewProjItemLocation string "C:\Visual Studio Projects"
vsregedit set local HKCU "" DefaultOpenProjItemLocation string "C:\Visual Studio Projects"
Now when we read any of the modified keys, it will show:
Name: DefaultNewProjItemLocation, Value: C:\Visual Studio Projects
I'm using VS 2017 and was being brought to the same directory time and time again, one I had not opened for a few months despite opening and creating dozens of projects afterwards. I tried resetting via Tools > Options, but to no avail. I finally created a txt file in the directory I wanted as my default and opened that through the dialog and now it's working again.