Experimental Build
To safeguard Visual Studio from untested applications that might change it, the Visual Studio SDK provides an alternative build of Visual Studio that you can use to experiment. You develop new applications by using Visual Studio as usual, but you run them by using this experimental build.
The experimental build is just Visual Studio, but with another registry hive that is named the experimental hive.
To start Visual Studio by using the experimental registry hive, run the following command at the command prompt in the Visual Studio Command window:
"<Visual Studio installation path>\Common7\IDE\devenv.exe" /RootSuffix Exp
注意
You can create a desktop shortcut to do this.
We recommend that you register your VSPackage under the experimental hive while you are developing it. When you deploy the VSPackage, register it under the regular hive. For more information about registering applications, see Registering VSPackages.
Updating the Experimental Registry Hive
When the Visual Studio SDK is installed, it clones the existing Visual Studio registry hive. The clone becomes the experimental hive.
After installation, the regular hive may change because of other installations or changes in settings. The Visual Studio SDK provides a utility, VsRegEx.exe, that lets you update the experimental hive to be the same as the regular hive. VsRegEx.exe copies the registry information from the existing Visual Studio hive to the experimental hive. By default, VsRegEx.exe is located in Visual Studio SDK installation path\Tools\bin\x86\.
To run VsRegEx.exe, use the following syntax.
VsRegEx Action RegRoot RootSuffix
Argument |
Description |
---|---|
Action |
The action to be performed. It must be one of the following choices, which are explained in the list that follows this table:
|
RegRoot |
The regular hive that is to be cloned. For example, the RegRoot for Visual Studio 2005 is 8.0, or 7.1 for Visual Studio .NET 2003. |
RootSuffix |
A suffix that distinguishes the experimental hive from the regular hive. By default, Visual Studio SDK Setup uses "Exp". |
注意
If you type VsRegEx at the command prompt without including arguments, or with an invalid action, then help text is displayed.
GetOrig deletes the Visual Studio experimental hive and then recreates it from the regular hive by copying registry keys and files from the user profile folder.
The RootSuffix argument specifies the destination name of the experimental Visual Studio hive. Typically, this value is Exp. Later, when you start Visual Studio by using the command devenv /RootSuffix Exp, registry data is set to be read from the experimental hive.
When VsRegEx.exe is given the command VsRegEx GetOrig 8.0 Exp, it copies regular registry keys and user profile files and then makes experimental versions, as follows.
From
To
HKLM\Software\Microsoft\VisualStudio\8.0
HKLM\Software\Microsoft\VisualStudio\8.0Exp
HKCU\Software\Microsoft\VisualStudio\8.0
HKCU\Software\Microsoft\VisualStudio\8.0Exp
%USERPROFILE%\Application Data\Microsoft\VisualStudio\8.0\*.*
%USERPROFILE%\Application Data\Microsoft\VisualStudio\8.0Exp\*.*
警告
If you type VsRegEx GetOrig \exp instead of VsRegEx GetOrig exp, an infinite recursion occurs and you will have to 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 by using SetLKG. Consider making a copy of your experimental configuration before you make changes to your code that could adversely affect the experimental hive.
The RootSuffix argument 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 that you have created.
When VsRegEx.exe is given the command VsRegEx SetLKG 8.0 Exp, it copies the following registry keys and user profile files.
From
To
HKLM\Software\Microsoft\VisualStudio\8.0Exp
HKLM\Software\Microsoft\VisualStudio\8.0LKG
HKCU\Software\Microsoft\VisualStudio\8.0Exp
HKCU\Software\Microsoft\VisualStudio\8.0LKG
%USERPROFILE%\Application Data\Microsoft\VisualStudio\8.0Exp\*.*
%USERPROFILE%\Application Data\Microsoft\VisualStudio\8.0LKG\*.*
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 argument specifies the destination of the LKG version. This option copies the settings from the LKG location to the RootSuffix location.
When VsRegEx.exe is given the command VsRegEx GetLKG 8.0 Exp, it copies the following registry keys and user profile files.
From
To
HKLM\Software\Microsoft\VisualStudio\8.0LKG
[HKLM\Software\Microsoft\VisualStudio\8.0Exp
HKCU\Software\Microsoft\VisualStudio\8.0LKG
[HKCU\Software\Microsoft\VisualStudio\8.0Exp
%USERPROFILE%\Application Data\Microsoft\VisualStudi\8.0LKG\*.*
%USERPROFILE%\Application Data\Microsoft\VisualStudio\8.0Exp\*.*
Delete deletes the experimental hive.
When VsRegEx.exe is given the command VsRegEx Delete 8.0 Exp, it removes the experimental hive and all its contents.
注意
After you run VsRegEx.exewith the GetOrig or GetLKG actions, you must run devenv.exe /rootsuffix RootSuffix /setup. If you do not do this, then the splash screen might be blank. By default, when RootSuffix is not specified in the VsRegEx arguments, Exp is used. When this is the case, you must run devenv.exe /rootsuffix Exp /setup.