How to: Migrate VSPackages to Visual Studio 2012

The procedures in this topic show how to migrate VSPackages from Visual Studio 2010 to Visual Studio 2012.

To migrate a basic VSPackage solution to Visual Studio 2012

  1. Install Visual Studio 2012 and the Visual Studio 2012 SDK.

  2. Open the project in Visual Studio (File/Open/Project).

  3. A message box appears, notifying you that the changes made to the project will make it impossible to open it in a previous version. Click OK.

  4. Update the target .NET framework. In the Solution Explorer, select the project node and click Properties. On the Application tab, change TargetFramework to .NET Framework 4.5.

  5. The header file msobtnid.h is no longer shipped with the Visual Studio SDK. If your VSPackage uses any of the icons defined in the file, change the icons to something else. For example, the VSCT file in the VSPackage standard template defines one of the icons as follows:

    <Icon guid="guidOfficeIcon" id="msotcidStrikethrough" />
    

    Change the GUID reference to "guidImages" and the ID to "bmpPicArrows":

    <Icon guid="guidImages" id="bmpPicArrows" />
    
  6. Build the solution. The built files are deployed to the following directory:

    %LOCALAPPDATA% \Microsoft\VisualStudio.11.0Exp\Extensions\<Author Name>\<Project Name>\1.0

    where %LOCALAPPDATA% is the value of that environment variable, <Author Name> is the name of the publisher of the project, and <Project Name> is the name of the project.

  7. Start debugging. A second instance of Visual Studio 2012 will appear.

    For more information about running VSPackages in the experimental instance, see Experimental Instance of Visual Studio.