Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual Studio SDK
Architecture
VSPackages
VSPackage Load Keys
 How to: Install a PLK (C#)

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual Studio SDK
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:

104

HZDEE1RRAZPJJ3JDDEKKMHDICMA2CACREPK9DPRDCDE8QTZRQZJJJDJ2A8CKZAZ9M3ZZECPIRADDQ1RIIKMKQ9ZHCZH3MKAKQ9CRE2C9C2PKIDH1JIZMHZMQQHDMQ9DQ

  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)]
    [Guid("5b28f8b4-3812-4b3c-b584-437433a45897")]
    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.

    NoteNote

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

See Also

Concepts

PLKs and the DLK
Experimental Build

Other Resources

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

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Visual Studio Add-In Package Load Keys (PLK's)      ETJorg ... Thomas Lee   |   Edit   |   Show History
I have a VS add-in that I'd like to mark with a PLK, but I haven't been able to make sense of your (too generic) instructions for installing the PLK in a 'Package'. Can you provide an example of how to mark a Visual Studio Add-in created with Visual Studio using the wizard (C#) specifically? Thank you.
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker