Visual Studio .Net 2003 Customized Settings Explained Further

I’ve had a request to explain further where Visual Studio settings are stored in VS .NET 2003 to make it easier for people trying to copy settings from machine to machine.  In this post I’ll break down where a lot of these settings are and how you can move them from machine to machine.


Window Layouts

I’ve explained this in detail previously.  To take your window layout settings with you you’ll need to copy the devenv.xml file from your \Documents and Settings\%Current User%\Application Data\Microsoft\VisualStudio\7.1\ directory to the current users app data directory on the new machine.  If there is one there you may want to back it up first if you don’t want to lose those file.



If you have modified the keybindings in VS through the keybindings tools options page and want to port them to a new machine you’re probably best off using the VSTweak utility.  If your not into installing another app then the customer keybinding files are all stored as *.vsk files again in your “\Documents and Settings\%Current User%\Application Data\Microsoft\VisualStudio\7.1\” directory. Once you create a new set of bindings in the options pane and close the IDE the new file is written.  The default installed bindings are stored in the “Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE” directory.  You can copy a VSK file from machine to machine when it is placed in the app data directory, but you have to select it from the keybindings options pane to make it take effect. 


Toolbar\Menu Configurations

If your like most people you’ve created your own custom toolbars or at least moved the default ones around a bit to make more room for your editor.  It can take a long time to get this just right since the menus in VS hop around so much in the 2002/2003 release while you are using the product.  Assuming you are using the English version of VS your custom menus are saved in the following file:

“\Documents and Settings\%Current User%\Application Data\Microsoft\VisualStudio\7.1\1033\CmdUI.PRF”

You should be able to move this file from machine to machine.  Again, this file is written once VS exits.  But this time you just close all instances of VS, replace one with the other, open VS and you should be golden.


Customized Toolbox Settings

I have a bunch of code snippets I keep in my toolbox.  Some people have the toolbox laid out just the way the like it.  This data is persisted on shut down of VS in the following file:

“\Documents and Settings\%Current User%\Local Settings\Application Data\Microsoft\VisualStudio\7.1\toolbox.tbd”

You should be able to move this from machine to machine most of the time. 


Misc Tools Options Stuff

So far this post covered a lot of customizations that you don’t find in the tools->options dialog.  Most of these settings, and more, are stored in the current user registry location for Visual Studio.  If you open regedit <Warning type=”Hey, you can seriously mess up your machine doing this stuff”> and navigate down the tree to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1 you’ll see a whole lot of different settings that are laid out pretty well in English you can read.  For example: Like your VB Editor settings? Export the key information and import the settings onto another machine where you’d like them transferred to. Hell, you could try exporting/importing the whole lot of them.  Be warned though that some settings don’t transfer well. Copying these in bulk will result in your MRU settings being transferred and your projects may not live on the same location on the same machine. Similar problems will exist if you have registered additional packages or add-ins to the user on the original machine.  </Warning> If you do run into problems that are undesirable after doing this on your new machine feel free to delete this key and all the information under it before restarting VS.  On first launch it will recreate all of your default settings again.  :-)


These are the ones I see requested most often.  If there are other settings you are looking to move from machine to machine let me know and I’ll post some more. 


Comments (12)

  1. Hi,

    I’m trying to transfer keybinding for my own macros to another machine without using the VSTweak utility.

    I’m using the .vsk file saved into “Documents and Settings%Current User%Application DataMicrosoftVisualStudio7.1” and my macro project file.

    First, I’m loading my macros project into VS. Then, I’m installing the .vsk file into “Documents and Settings%Current User%Application DataMicrosoftVisualStudio7.1” of the new machine. While going to Option->Environment->Keyboard, the copied scheme is there. Therefore, the keybinding for my own macros is lost.

    Do you have any clue of what is going on?


  2. jledgard says:

    Which VSK file are you using and which VSK file is selected on both ends in the dialog?

  3. I first made a copy of Visual C++ 6.0 scheme and added keybinding for my own macros. Let’s say that my saved scheme is chofra. So the vsk file is called chofra.vsk and saved as “Documents and Settings%Current User%Application DataMicrosoftVisualStudio7.1chofra.vsk"

    Then, on the destination machine, I’m loading my macros project and I copy the chofra.vsk file on the same directory of the source machine.

    In VS .NET, the macros is loaded, the keyboard mapping scheme is present, but the shortcut key mappings is not present.

  4. josh ledgard says:

    Do the macros have the same named command path on both machines? If so there might be a bug/feature there that prevents the VSK file (or the command interpetur that loads it) from thinking that the command really exists on the new machine so it neglects the binding you made thinking there was a problem with it.

  5. Since the command path are the same on both machine, it could be what you explained.

    However, do you know if it’s possible to write a macros that could perform the auto-keybinding so you don’t have to manually add shortcut key for each of the available macros?