To safeguard Visual Studio from applications you develop that might change it, the Visual Studio SDK provides an experimental build of Visual Studio. You develop new applications by using Visual Studio as usual, but run them with the experimental build.
The experimental build is nothing more than Visual Studio with another registry hive called the experimental hive. Having two side-by-side registrations of Visual Studio helps protect your Visual Studio installation from any harm that the experimental software could cause.
To start Visual Studio by using the experimental registry hive, run the following command from the Visual Studio command prompt:
"< visualStudioInstallPath> \Common7\IDE\devenv.exe" /RootSuffix Exp
You can create a desktop shortcut to do this.
It is common practice to register a VSPackage under the experimental hive when you are developing it. When you deploy the VSPackage, you should register it under the regular hive. For more information about registering applications, see.
Updating the Experimental Registry Hive
When the Visual Studio SDK is installed, it creates a clone of the existing Visual Studio registry hive and makes a new copy in the experimental hive.
Occasionally, you might want to update the cloned experimental registry hive to include items that you might have installed since the default installation. The Visual Studio SDK includes a simple executable file that copies the registry information from an existing Visual Studio hive into an experimental hive. This file is named VsRegEx.exe and is located in the Tools/bin/x86 directory of the Visual Studio SDK.
To run VsRegEx.exe, use the following syntax.
VsRegEx.exe Action RegRoot RootSuffix
The action to be performed. It can be any one of the following choices, explained in the list following this table:
The original hive that is to be cloned. This can be 7.1 when targeting Visual Studio .NET 2003, or 8.0 when targeting Visual Studio 2005.
A suffix to distinguish the experimental hive from the original hive. By default, VSIP Setup uses "Exp".
If you type VsRegEx without parameters or with an invalid action, help text is displayed.
GetOrig deletes the Visual Studio experimental registry hive and recreates it from the main Visual Studio hive by copying registry keys and files from the user profile folder. The RootSuffix parameter specifies the destination name of the experimental Visual Studio hive. Typically, this value is Exp. Subsequently, starting Visual Studio with devenv /RootSuffix Exp sets the data to be read from the experimental hive.
Given the command line VsRegEx GetOrig 8.0 Exp, VsRegEx copies the following registry keys and user profile files:
If you type VsRegEx GetOrig \exp instead of VsRegEx GetOrig exp, an infinite recursion occurs and the user must reinstall Visual Studio.
SetLKG sets the last known good (LKG) configuration state by copying registry keys and files from the user profile folder. You can create and store a working experimental registry hive with SetLKG. Consider making a copy of your experimental configuration before you make changes to your code that could adversely change the experimental hive.
The RootSuffix parameter specifies the source version that is used to create the LKG. This option copies the settings from the RootSuffix location to the LKG location. Typically, you copy your experimental registry hive, where Exp is the RootSuffix, but you can store any hive you have created.
Given the command line VsRegEx SetLKG 8.0 Exp, VsRegEx copies the following registry keys and user profile files:
GetLKG restores a given configuration to the state of the LKG configuration by copying registry keys and files from the user profile folder. The RootSuffix parameter specifies the destination of the LKG version. This option copies the settings from the LKG location to the RootSuffix location.
Given the command line VsRegEx GetLKG 8.0 Exp, VsRegEx copies the following registry keys and user profile files:
Delete deletes the experimental Visual Studio hive.
Given the command line VsRegEx Delete 8.0 Exp, VsRegEx removes the experimental hive and all its contents.
After running VsRegEx with the GetOrig or GetLKG actions, you must run devenv.exe /rootsuffix RootSuffix /setup or the splash screen might be blank. When RootSuffix is not specified in the VsRegEx parameters, Exp is used by default. Therefore, you must then run devenv.exe /rootsuffix Exp /setup.