Microsoft MVP Logo

One of the best additions to Visual Studio 2005 over previous versions was the ability to persist and load your settings to an XML file. This way, you can configure your IDE the way you like it, across various machines, or across your entire development team (if you're a heavy-handed corporate environment). Quite a handy way to make sure your fonts, font sizes, colors, and other settings in Visual Studio are the same in your virtual machines as they are on your desktop. Here's what I like my code editor to look like (code is from a Windows Live Writer plugin I'm writing):

VisualStudioCodeEditorMy Visual Studio Code Editor settings (font, font size, and colors)

Everyone has their own settings... as I mentioned fonts, sizes, colors. I also like to configure the following:

  • Visual Studio opens with an empty environment (has ANYONE ever read that start page, much less clicked on one of the links?)
  • Uncheck the Track Active Item in Solution Explorer (Tools -> Options -> Projects & Solutions node - General node)
  • Check Always show solution (same place as above)
  • Check Show Output window when build starts (same location as above)
  • Many others...

The only thing I can think of that's more maddening is having to take the time to import or export your settings. Try changing the color, font, or font size in that tiny options dialog on the Environment / Fonts and Colors node... I still don't understand why the product team didn't make this a resizable dialog (complaint here)! I'm sure the process of importing your settings is slow because the IDE is running... there must be a faster way... can't you script that? YES YOU CAN!

I keep two settings files: "AC Settings.settings" and "AC Presentation Settings.settings". The biggest difference between the two: the presentation settings file bumps the font  up to 16pt and turns on word wrap.

If you have to ask why bump your font up when you're presenting, you deserve to get slapped... if I have to sit in another presentation and hear someone say "can you bump the font up?" I'm going to keel over... "get your ass back here... can you read your own 9pt font on a projector from 30 feet away? no? then bump your damn font up ahead of time!"). I digress...


So, before I launch my IDE, why not configure it to work with your settings? There's a command line switch for Visual Studio 2005 where you can tell it to automatically load your settings. Just drop into a command prompt, use the /ResetSettings switch, and add the path to your settings file. Still takes a moment for the IDE to import the settings, but doing it this way is easier and automated! 


Here are two batch files I keep in my c:\utils folder:

VS Settings - Normal.cmd

@echo offecho Setting Visual Studio Settings to: "AC Settings.settings""C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" /ResetSettings "C:\Documents and Settings\[PROFILE_NAME]\My Documents\Visual Studio 2005\Settings\AC.vssettings"

VS Settings - Presenation.cmd

@echo offecho Setting Visual Studio Settings to: "AC Presentation Settings.settings""C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" /ResetSettings "C:\Documents and Settings\[PROFILE_NAME]\My Documents\Visual Studio 2005\Settings\AC Presentation.vssettings"

[Updated 8/30/2006 @ 1p] Updated the two command lines to show you need to put YOUR profile name in there, not mine.

Comments powered by Disqus