How to: Upgrade Visual Studio .NET 2003 Add-ins to Visual Studio 2005 by Using XML Registration (Managed)

The XML registration method is simpler than the COM registration method. This is the preferred method for using a Visual Studio .NET 2003 managed add-in with Visual Studio 2005.

If command bars are used, you must update the code and recompile the add-in by using Visual Studio 2005. For more information, see How to: Migrate Visual Studio .NET 2003 Add-ins to Visual Studio 2005.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. These procedures were developed with the General Development Settings active. To change your settings, choose Import and ExportSettings on the Tools menu. For more information, see Visual Studio Settings.

Registering an Add-In

The following procedure registers a managed add-in by using an .Addin xml file.

To register an add-in by using a xml registration file

  1. Move the add-in that was created with Visual Studio .NET 2003 and its satellite assemblies to the Visual Studio 2005 computer.

  2. Create a text file named myaddinname.Addin. Open the file with Notepad and add the following XML data:

    <?xml version="1.0" encoding="UTF-16" standalone="no"?>
    <Extensibility xmlns="https://schemas.microsoft.com/AutomationExtensibility">
        <HostApplication>
            <Name>Microsoft Visual Studio Macros</Name>
            <Version>8.0</Version>
        </HostApplication>
        <HostApplication>
            <Name>Microsoft Visual Studio</Name>
            <Version>8.0</Version>
        </HostApplication>
        <Addin>
            <FriendlyName>AddinName - No Name provided.</FriendlyName>
            <Description>AddinDescription - No Description provided.</Description>
            <Assembly>The path to your assembly.</Assembly>
            <FullClassName>yourassemblyname.addinclass</FullClassName>
            <LoadBehavior>0</LoadBehavior>
            <CommandPreload>0</CommandPreload>
            <CommandLineSafe>0</CommandLineSafe>
        </Addin>
    </Extensibility>
    
  3. Edit the content within the <FriendlyName> and <Description> tags to describe your add-in.

  4. Within the <Assembly> tag, add the absolute path to your assembly.

  5. Within the <FullClassName> tag, change the content by using the following format: yourassemblyname.addinclass.

    yourassemblyname is the name of the assembly without file extension. addinclass is the name of the class that defines the add-in. When using the Add-In Wizard, the default class is named Connect.

  6. Save the file as Unicode characters. Otherwise, the add-in will fail to register. The path is <drive>:\Document and Settings\All Users\Application Data\Microsoft\MSEnvShared\Addins or<drive>:\Document and Settings\yourusername\Application Data\Microsoft\MSEnvShared\Addins depending on whether the add-in will be made available to other users. Create the path if it does not already exist.

See Also

Tasks

How to: Use a Visual Studio .NET 2003 Add-in Deployment Package to Register an Add-in with Visual Studio 2005 (Managed and Unmanaged)

How to: Migrate Visual Studio .NET 2003 Add-ins to Visual Studio 2005

Concepts

Add-in Registration

Migrating and Upgrading Add-ins from Visual Studio 2005 to Visual Studio 2008