Compartilhar via


Elements of the Isolated Shell

You can modify the registry settings, run-time settings, and application entry point of your isolated shell application, and its .vsct, .pkgdef, and.pkgundef files.

Registry Settings

Both the .pkgdef and the .pkgundef files modify the registry settings for the isolated shell application. When the application is run, the registry settings are defined in this sequence:

  1. The registry key for the application is created.

  2. Keys and entries in the registry are updated as specified in the .pkgdef file of the application. These updates include a $RootKey$\Packages\{vsPackageGuid} key for every package in the application.

  3. The registry key for each package in the application is updated as specified in the .pkgdef file of that package.

  4. The registry is updated as specified in the AppEnvConfig.pkgdef and BaseConfig.pkgdef files in the Visual Studio SDK installation path\Common7\IDE\ShellExtensions\Platform\ directory. These files are part of Visual Studio and also are included in the Visual Studio Shell (isolated mode) redistributable package.

  5. Certain keys and entries in the registry are removed as specified in the .pkgundef file of the application.

Run-Time Settings

When a user starts an isolated shell application, it calls the Start entry point of the Visual Studio shell. Application settings are defined when your application starts, as follows:

  1. The Visual Studio shell checks for specific registry keys. If the call to the Start entry point specifies a value for one of these keys, then that value overrides the value in the registry.

  2. If neither the entry point parameter nor the registry specifies the value of a setting, then the default value for the setting is used.

When a user starts the application from the command line, all command-line switches are passed to the Visual Studio shell, which treats them in the same way that Devenv does. For more information about Devenv switches, see Devenv Command Line Switches and Devenv Command-Line Switches for VSPackage Development. For more information about how a package registers for command-line switches, see Adding Command-Line Switches.

The Start Entry Point

The Appenvstub.dll file contains entry points for accessing the isolated shell. When the application starts, it calls the Start entry point of Appenvstub.dll.

You can change the behavior of your application by changing the value of the last parameter that is passed to the Start entry point. For more information, see Isolated Shell Entry Point Parameters (C++).

The .Vsct File

In the .vsct file, you can specify which standard Visual Studio UI elements are available in the application. For more information, see Modifying the Isolated Shell By Using the .Vsct File.

The .Pkgundef File

When the application is installed on a computer on which Visual Studio is already installed, a copy of the Visual Studio registry entries is made for the application. By default, an application uses VSPackages that are already installed on the computer. You can use the .pkgundef file in your application to prevent it from using elements of Visual Studio or other extensions. For more information, see Modifying the Isolated Shell By Using the .Pkgundef File.

The set of Visual Studio feature GUIDs that you can exclude are listed in Package GUIDs of Visual Studio Features.

The .Pkgdef File

You use the .pkgdef file to define registry entries that are set when the application is installed. For a description of the .pkgdef file and a list of registry entries that the Visual Studio shell uses, see Modifying the Isolated Shell By Using the .Pkgdef File.

Substitution Strings

See Substitution Strings Used in .Pkgdef and .Pkgundef Files.

Other Settings

If your isolated shell application depends on Microsoft.VisualStudio.GraphModel.dll, you must add the following binding redirect to the application’s .config file:

<dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.GraphModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="11.0.0.0" newVersion="12.0.0.0"/>
</dependentAssembly>

See Also

Concepts

Shell (Integrated or Isolated)