Did you know that Visual Studio 2010 has the ability to store parallel collections of settings?

Spinning up a "Demo" Instance of VS2010

Have you ever been giving a talk or a demonstration where you flipped from PowerPoint to Visual Studio 2010 to show some code and people at the back start making demands:

I can't read that, can you up the font? Black on White works better on the projector! What are those little lines next to your scrollbar? Can you close all the tool windows?

I have so I started keeping a separate user on my laptop called MrDemo that I used to keep my Visual Studio settings separate. That is until I found the Experimental Instance feature in Visual Studio 2010 SDK. From the link:

To safeguard your Visual Studio development environment from untested applications that might change it, the Visual Studio SDK provides an alternative Visual Studio instance that you can use to experiment. You develop new applications by using Visual Studio as usual, but you run them by using this experimental instance.

The Experimental Instance allows you to develop and test Visual Studio extensions in an isolated environment. It does this by maintaining its own collection of settings and extensions.

The Visual Studio 2010 SDK comes with a shortcut to run the experimental instance but you don't need to install the SDK to use it. Simply run the following from the VS2010 command line:

devenv.exe /RootSuffix Exp

The "Exp" root suffix is what makes this version of Visual Studio different from your normal Visual Studio install. It stores information about its settings and extensions in

%LocalAppData%\Microsoft\VisualStudio\10.0Exp

on the file system and

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0Exp
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0Exp_Config

in the registry. This means that any settings you change here will not affect the vanilla install of VS2010 on your machine and vice-versa.

Now, the "Exp" root suffix is just a convention used by the SDK tools and your probably don't want to use the Experimental Instance for demo purposes, especially if you actually do any actual VS SDK work. Instead you can create a new Instance specifically for presentations. I'm going to call this my Demo Instance.

To create the Demo Instance just start it:

devenv.exe /RootSuffix Demo

If this is the first time you are running this instance you will get the normal Choose Default Environment dialog that you get the first time you run Visual Studio after installation.

VS2010 Choose Default Settings

Note that there is a new checkbox asking if you would like to migrate settings from the regular Visual Studio. If you want the most basic, vanilla version of Visual Studio (and I suggest that for presentations that you do) then uncheck this box.

The settings for this new instance are stored at:

%LocalAppData%\Microsoft\VisualStudio\10.0Demo

on the file system and in the registry at:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0Demo
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0Demo_Config

Now you can up the font, use the standard colour scheme, not use ReSharper, close all of the tool windows and still leave your normal development environment settings for day-to-day .NET-ninja work.

If you want to get rid of the Demo Instance (or reset it) you can delete the folder and the registry keys noted above and it is gone. Create a shortcut for it and say goodbye to the MrDemo user account.

visual-studio-2010
Posted by: Mike Minutillo
Last revised: 16 Sep, 2011 04:08 AM History

Comments

16 Sep, 2011 06:06 AM

"not use ReSharper"

whu? For demos I require more ReSharper

16 Sep, 2011 06:56 AM

Yeah but then you always get people either:

  • complaining that they don't use ReSharper so they couldn't follow your demo OR
  • excited by your awesomeness and show me that tool thingy you were using

Both of which detract from what you are trying to show in the first place.

16 Sep, 2011 06:02 PM

This is a great tip!

16 Sep, 2011 06:08 PM

Awesome tip. Might even use this for honing down unnecessary items etc. when I just need a quicker lightweight second VS instance open for comparing something.

16 Sep, 2011 06:37 PM

Why is this better than just having a presentation settings file? Pretty easy to save and load settings, and then you can have the presentation settings customized - e.g. selection highlight color, etc.

http://blogs.msdn.com/b/pstubbs/archive/2010/06/16/presentation-mode-in-visual-studio.aspxlink text

Petar Repac
Petar Repac
18 Sep, 2011 08:25 AM

@Jon Galloway: With export/import settings you cannot disable add-ins and extensions.

Dan
Dan
19 Sep, 2011 04:27 PM

Very cool... I'll never actually use it, but it's a great thing to know and pass on.

Allan
Allan
22 Sep, 2011 01:56 PM

This is pretty handy... You can use any word after the root suffix (I used my last name a second ago), so I'm thinking of some of the possibilities of this to set up different environments and so forth, or different environments for multiple users on a single (non-domain, single logon) machine (if such a thing may exist). The key is disabling the extensions you don't need/require for some projects. I don't know how "useful" it is, but it is a nice option to have when needed. And, you can setup shortcuts to open in that environment.

Groovy! Thanks!

No new comments are allowed on this post.