How to: Install a PLK (C#)
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

How to: Install a PLK (C#)

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

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

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, except that all arguments are case-insensitive.

  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.

See Also


PLKs and the DLK
Experimental Build

Other Resources

VSPackages (How Do I in Visual Studio Integration)
VSPackage Load Keys

© 2016 Microsoft