Condividi tramite


DLK and PLK Explained

When you install the Visual Studio SDK, you install a developer license key (DLK). This DLK grants you permission to develop VSPackages and shell applications.

Visual Studio requires every VSPackage to have a unique package load key (PLK), which it uses to authenticate the VSPackage registration and enable it to load. You must obtain a PLK for your VSPackage before other users can install it and use it.

Developer License Key (DLK)

The DLK is a generic key that is installed together with the Visual Studio SDK. The DLK permits you to run your VSPackage or isolated shell application on any computer on which Visual Studio and the Visual Studio SDK are installed. This lets you develop and test your VSPackage or shell application before you deploy it to other users. However, the Visual Studio SDK license terms do not permit you to include the DLK together with your VSPackage or shell application when you distribute it to other users. You must include a PLK instead.

Package Load Key (PLK)

The Visual Studio security model uses authentication of PLKs to prevent unauthenticated VSPackages from loading in the integrated development environment (IDE).

A PLK is a public-key encoded string that is generated for a specific VSPackage. Every time that a VSPackage tries to load, Visual Studio validates its PLK by synchronizing the PLK with a private key. A successful match authenticates registration and enables the VSPackage to load. This applies both to auto-loaded and delay-loaded VSPackages.

The following is additional information about PLKs:

  • Each VSPackage must have its own unique PLK even if it is a component of a single product that contains more than one VSPackage.

  • The PLK string is derived from data that you provide to Microsoft when you request the PLK. For more information, see How to: Obtain a PLK for a VSPackage and How to: Add a PLK to a VSPackage Project (C#).

  • If a PLK is not valid, Visual Studio does not load the associated VSPackage and the user receives an error message. To learn how to troubleshoot a PLK load failure, see How to: Troubleshoot a PLK Load Failure.

  • A PLK can be loaded from either the VSPackage DLL or a satellite DLL. The IDE tries to load a PLK from all DLLs, and it runs authentication on any PLKs that it acquires.

  • The fields in a PLK are not localized.

See Also

Concepts

VSPackage Load Keys

SLKs and the DLK