Freigeben über


Gewusst wie: Aktualisieren von Visual Studio .NET 2003-Add-Ins auf Visual Studio 2005 mithilfe der XML-Registrierung (verwaltet)

Aktualisiert: November 2007

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 Gewusst wie: Migrieren von Add-Ins von Visual Studio .NET 2003 in Visual Studio 2005.

Hinweis:

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-Einstellungen.

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.

Siehe auch

Aufgaben

Gewusst wie: Verwenden eines Add-In-Bereitstellungspakets aus Visual Studio .NET 2003 zum Registrieren eines Add-Ins bei Visual Studio 2005 (verwaltet und nicht verwaltet)

Gewusst wie: Migrieren von Add-Ins von Visual Studio .NET 2003 in Visual Studio 2005

Konzepte

Add-In-Registrierung

Migrieren und Aktualisieren von Add-Ins von Visual Studio 2005 auf Visual Studio 2008