Ah, VS Settings.  I've been meaning to post on this topic for ... oh ... about 4 months now.  I guess it's about time.

If you've ever used Visual Studio and you've ever ventured onto the Tools.Options dialog, you've discovered the dizzying array of customizable settings offered by the IDE.  You've also undoubtably discovered (possibly by accident) that the positions of the IDE's tool windows are fully customizable.  And you may have discovered that, like Office, the menus and toolbars of VS are fully customizable.  In fact, VS is so customizable that you can easily spend many hours customizing the IDE to make it look and behave the optimal way for your individual work style.  For multiple versions now, customers have requested some way of capturing all this work they've done in setting up the IDE, so they can quickly and easily recreate their personal settings at a later time or on another machine.  I'm happy to say that we'll be providing a feature in VS Whidbey to enable this scenario.

The Import/Export Settings dialog/wizard will be available from the Tools menu in VS.  It allows you to choose categories of settings to export to a .vssettings file, and it allows you to point to an existing .vsettings file and choose categories of settings to import from that file.  So what is a settings 'category'?  In general, a category of settings is a logical grouping of settings for a toolwindow, a tools.options page, or an IDE feature.  Examples of categories are:

  • Each individual Tools.Options page (e.g. Environment.General, Text Editor.C#.Tabs, etc.)
  • Window Layouts (tool window positions in design, debug, and fullscreen modes)
  • Commands and Menus customizations
  • Toolbox customizations
  • External Tools, etc.

Courtesy of our PM, James, I've posted some preliminary screenshots of the UI from the Import/Export Settings feature spec so you can provide feedback on the design.  Follow these links to find pictures of the welcome screen to the wizard, export screen one, two, and three, and import screen one, two, and three.  The Import/Export wizard is intended to smoothly guide you through the process of choosing which settings to export/import and where to save them to/load them from.  The last screen of the wizard is actually incomplete in these images.  We'll be providing a log of some sort describing any errors that have occured during the export/import process, such as settings categories that failed to export, or invalid settings in the file that could not be applied during import.

Note: If you receive a copy of the VS Beta or play with one of the Visual Studio Technology Previews, you'll actually find a different UI when you access the Tools.Import/Export Settings command.  Those releases contain a preliminary UI that we've been using internally during the development of the Import/Export feature.  It's functionally equivalent to the wizard UI in the images above, but our usability tests and UI walkthroughs have determined unanimously that it's too nonstandard, too difficult to use, and involves a rather annoying number of popup messages and other dialogs.  If you've used this preliminary version, I certainly wouldn't mind to hear your comments about it, but I won't bother posting screenshots here since it's going away soon.

 

In addition to the manual import/export UI, we'll also be supplying a sub-feature that's designed to make it easier for a single developer to work on multiple machines at once.  Found on the Environment.Import/Export Settings options page, under the heading 'Automatically load and save settings', this feature enables you to specify a vssettings file that will be kept up to date with your current settings (on each close of VS).  On VS startup, if this file is newer than last remembered, we will import all the settings from this file.  That enables a scenario where you have two machines, each with VS installed, where you want VS to look and behave the same on both machines.  If you point both machines at the same auto-save file and you change a setting on one machine, it will automatically show up on the other machine.

Another sub-feature, called 'Team settings' is designed to make it easier for a team of developers to maintain similar settings in certain categories.  With this feature you can point the IDE at a particular vssettings file (typically on a intranet share), and the IDE will check that file on each startup to see if it is newer than remembered; if so, the IDE will import all settings from that file.  To see how this would be useful, consider an example where you have a team of people who should all be using the same indenting/formatting options for C++ files.  The manager of that team can open VS, change the formatting options to the team's defaults, export just the C++ formatting settings category to a vssettings file on a network share, then ask everyone on the team to point VS at that team settings file.  The whole team will then automatically stay in sync wrt C++ file formatting.  If the team should ever decide to change the defaults, or perhaps additionally set defaults for C#, the can simply export new settings to that same file, and everyone on the team will automatically have the new settings next time they start the IDE.

 

Another feature that customers have been requesting for quite some time is the ability to easily reset the IDE to it's default settings.  Having such a customizable IDE is great at times, but it also has the downside of providing the opportunity for people to shoot themselves in the foot.  Customers commonly do this by accidently removing important features from their Menus, or accidently customizing their tool windows into an unusable layout.  In VS 2002 and 2003, there were individual places you could go to reset portions of the IDE, (e.g. the Window.ResetWindowLayout command, or the 'Reset Toolbar' button on the Tools.Customize dialog) but these reset features were very difficult to find, and only encompassed a small subset of the IDE settings.

Earlier on, you may have noticed the 'Reset all Settings' option on the wizard's welcome screen image.  The idea behind this Reset option is to allow you to go back to the environment defaults for all your settings.  If you know that you only want to reset certain settings categories, then you can do that via the normal Import option on this same dialog.  Conversely, if your settings have gotten into such a bad state that they're preventing you from using the IDE at all, or preventing you from accessing the Import/Export Settings feature, you can use the new 'devenv /resetsettings' command line switch to restart the IDE with default settings applied.

 

You may have noticed in the Reset image that you have the option to reset to several different 'default' settings; you can choose between VB, VC, C#, Web, and J#.  Let me go into more detail about what those are, along with some history as to why we have them.

In VS 2002, we finally got the VB, C++ and Web development products into a single IDE.  This was good in that you could use all of these products while really only having to learn to use a single product.  It was also bad in that each product had to compromise in some areas in order to fit nicely with the other products.  For instance, VB developers don't typically want to use the Disassembly window when debugging and C++ developers don't typically like to have the Toolbox window taking up their precious coding real estate.  But in VS 2002 and 2003, both types of developers had to put up with these annoying (to them) default settings because they were important to other VS customers.

We plan to address this problem in VS Whidbey by defining default settings for each major developer type, generally aligned around the developer's language of choice.  These default settings will focus on enabling the particular workstyle we've found each developer type to exhibit.  When each customer starts VS for the first time, they will be asked to classify themselves according to their 'primary development activity', and the IDE will startup pre-configured for that activity.  Obviously most people will want to go through and make further customizations according to their own personal tastes, but our hope is that this will provide a starting point that is closer to what each VS developer expects from their IDE.  Also, the Reset option on the Import/Export Settings wizard allows people to easily switch between different defaults to experiment and see which ones most closely match their individual workstyle.

If you have feedback about about how you customize your IDE settings for your particular development activity, I'd love to hear it and I'll pass it on to the people responsible for defining these defaults.

I'd also like to hear feedback around the general design above as well as around which settings you like to customize in VS 2002 and 2003, and how you think you'd make use of this feature in VS Whidbey.

Also, if you'd like me to drill in more on anything about this feature let me know.  E.g. I can talk about some of our design decisions, or about how 3rd party packages can plug into the VS Settings infrastructure.