Visual Studio Hacks
Tips

Cleaning up the VS Environment when things go wrong

by dstokes on December 19, 2008

On the MSDN forums, I see many questions on how to reset either the menus or the visible commands in Visual Studio.  A related issue I see quite a bit is how to correct problems that occur when a Visual Studio package has not installed/uninstalled properly.  The following 2 tips fix these issues for most people.

Resetting your environment back to the beginning

From the main menu, select “Tools – Import and Export Settings…”.  The last radio button gives you the option to reset to the default settings.

settingsdialog

After selecting this option and pressing Next, you are given the option of saving your existing settings to a file (which can later be importing using the second option on the Import and Export Settings dialog above.

choosedefaultsettings

Finally, you are given the option to select the new environment settings.  Afterwards, any commands that have gone missing from your original environment or any strange window docking settings should be back to normal.

devenv.exe /setup

Running the command “devenv.exe /setup” causes Visual Studio to re-merge all windows and command settings for packages that have been installed.  If a Visual Studio package has not installed/uninstalled properly, I have had good luck correcting problems with my environment by running this command.  At the very least, it is a good option to try before reinstalling Visual Studio.

Running the command is easy.  Open the Visual Studio command window (Start Menu – Visual Studio 2008 – Visual Studio Tools – Visual Studio 2008 Command Prompt) and run devenv.exe /setup.  The command could run for a few minutes (or even several minutes).  The length will be determined by how many and which packages you have installed. 

Hopefully these two options might help you solve weird Visual Studio environment problems that you come across and prevent you from having to reinstall the IDE (saving time is a good thing).

Comments on this entry are closed.

Previous post: Visual Studio Links #89

Next post: Visual Studio Links #90