This documentation is archived and is not being maintained.

Appendix A: Visual Studio Package Load Keys

To successfully deploy a domain-specific language on a computer that does not have the Visual Studio SDK installed, the domain-specific language solution must include a valid package load key. If you deploy a domain-specific language without a valid package load key, the Package Load Failure dialog box will appear. For more information about obtaining a package load key, see How to: Obtain a PLK for a VSPackage.

When you have a package load key, you should add it as a string resource to the file Shell\VSPackage.resx, in the DslPackage project of your domain-specific language solution. You must also apply the ProvidePackageLoadKey attribute to your Package class. The code comments in GeneratedCode\Package.tt in the DslPackage project gives an example of applying this attribute. If you are satisfied with the values in the example, you can uncomment this line after you obtain a package load key.

// [ProvideLoadKey("Standard", Constants.productVersion, Constants.productName, Constants.companyName, 1)]
public sealed partial class <#=this.Definition.Name#>Package
{
}

The first four parameters to this attribute (minimum edition, product version, product name, and company name) are encoded in your package load key. You must provide these values when you request the package load key. (You can find the actual string values in the file Shell\Constants.cs in the Designer project.) You must also provide your package GUID, which you can find in GuidList class in the file GeneratedCode\GeneratedCmd.h in the DslPAckage project. The last parameter to the ProvidePackageLoadKey attribute indicates the key in VSPackage.resx that specifies the package load key resource. For example, given the code above, the package load key resource would need to be named "1."

Show: