How to: Register the Host Application

To register your host application on the development computer, create the host configuration registry subkey. Then, generate the host context registry hive by running vsta.exe with several command line arguments.

For more information, see Registering the Host Application.

To create the host configuration subkey

  1. Click Start, and then click Run.

  2. Type regedit, and then press ENTER.

  3. In the Registry Editor, navigate to the host context configuration key:

    • On 32-bit platforms:

      HKEY_LOCAL_MACHINE\Software\Microsoft\VSTAHostConfig

    • On 64-bit platforms:

      HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VSTAHostConfig

  4. Right-click the VSTAHostConfig key, point to New, and then click Key.

    A new key is created beneath the VSTAHostConfig key.

  5. Give the new key a name that identifies your host application. This name is called the host ID.

    The host ID must consist of ANSI alphanumeric characters, contain no spaces, and be no more than 128 characters in length. Visual Studio Tools for Applications uses this name to identify the host application when you start the integrated development environment (IDE) and create project templates.

  6. Right-click the host ID key, point to New, and then click Key.

    A new key is created beneath the host ID key.

  7. Name the new key 2.0.

    This key specifies the current version of your application. When you integrate Microsoft Visual Studio Tools for Applications 2.0 with a host application, you must use 2.0 for the name of this key.

  8. Add the required AppName, ProjectTemplatesLocation, and VSTAVersion entries to the new 2.0 key. Also add any optional subkeys and entries to the new key. For more information, see Host Configuration Registry Key Settings.

To generate the host context registry hive

  1. Open the Visual Studio 2008 Command Prompt window and change to the following directory: %ProgramFiles%\Microsoft Visual Studio 9\Common7\IDE\.

  2. Type the following command. Replace hostID with the name of the host ID key you created earlier, and then press ENTER.

    vsta.exe /hostid hostID /setup
    

    Visual Studio Tools for Applications uses the entries and subkeys that you created under the host configuration key to generate the host context hive under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTAHost\hostID\9.0. For more information, see Registering the Host Application

    If you added the VSCSProjectTemplatesLocation, VSCSProjectTemplatesLocation, or VSItemTemplatesLocation entries, you must also run the following command to unpack the templates to the appropriate cache directory for Visual Studio 2008.

    devenv.exe /setup
    

    For more information about using devenv.exe, see Devenv Command Line Switches.

See Also

Tasks

How to: Update the Registration for the Host Application

Concepts

Registering the Host Application

Host Configuration Registry Key Settings

Configuring the IDE