Export (0) Print
Expand All

How to: Add a PLK to a VSPackage Project (C#)

After you obtain a package load key (PLK), you must install it in your VSPackage. For more information, see How to: Obtain a PLK for a VSPackage.

To install and test a PLK in a VSPackage

  1. Open the project to which you want to add the PLK.

  2. In Solution Explorer find the resource file that is associated with your VSPackage, for example, VSPackage.resx, and open it.

  3. Add a numbered resource, for example, 104. Give it the value of the PLK that you obtained for your VSPackage, for example:



  1. Update or add the ProvideLoadKeyAttribute attribute to the class that implements your VSPackage, for example:

    [ProvideLoadKey("Standard", "1.0", "My Package Name", "My Company", 104)]
    public sealed class MyPackage : Package

    where "Standard" is the minimum Visual Studio edition, "1.0" is the product version, "My Package Name" is the VSPackage name, "My Company" is your company name, and 104 is the resource ID of the PLK. All arguments should exactly match the information that was used to obtain the PLK.

  2. Rebuild the solution and verify that it compiles without errors.

    The PLK is compiled into the VSPackage and registered accordingly.

  3. In Solution Explorer, right-click the MP project node and then click Properties. Add the /noVSIP switch to the Debug/Command line arguments entry:

    /rootsuffix Exp /noVSIP

    This makes sure that Visual Studio examines the PLK instead of the DLK.

  4. Press F5 to start the program under the debugger.

    Visual Studio Exp opens.

  5. On the Tools menu, click MP.

    A Visual Studio message box appears and you see a message such as this in the Output window of the experimental build:

    VSIP: Third party package 'Vsip.MP.MP' ... approved to load ...

    This message shows that you have successfully loaded your VSPackage with the PLK.


    If your package does not load, see How to: Troubleshoot a PLK Load Failure.

Community Additions

© 2015 Microsoft