ProvideLoadKeyAttribute(String, String, String, String, Int16) Constructor

Definition

Creates a new ProvideLoadKeyAttribute.

public:
 ProvideLoadKeyAttribute(System::String ^ minimumEdition, System::String ^ productVersion, System::String ^ productName, System::String ^ companyName, short resourceId);
public:
 ProvideLoadKeyAttribute(Platform::String ^ minimumEdition, Platform::String ^ productVersion, Platform::String ^ productName, Platform::String ^ companyName, short resourceId);
 ProvideLoadKeyAttribute(std::wstring const & minimumEdition, std::wstring const & productVersion, std::wstring const & productName, std::wstring const & companyName, short resourceId);
public ProvideLoadKeyAttribute (string minimumEdition, string productVersion, string productName, string companyName, short resourceId);
new Microsoft.VisualStudio.Shell.ProvideLoadKeyAttribute : string * string * string * string * int16 -> Microsoft.VisualStudio.Shell.ProvideLoadKeyAttribute
Public Sub New (minimumEdition As String, productVersion As String, productName As String, companyName As String, resourceId As Short)

Parameters

minimumEdition
String

The minimum edition of Visual Studio on which the VSPackage is loaded. This must be the literal edition value provided by Microsoft when obtaining your Package Load Key (PLK).

productVersion
String

The version of the product that this VSPackage implements.

productName
String

Name of the product that this VSPackage delivers. Products comprised of multiple VSPackages each need their own PLK.

companyName
String

VSIP Partner/creator of the VSPackage. Must exactly match the name you provided to Microsoft when you registered for a PLK. companyName is case-sensitive.

resourceId
Int16

Resource ID for VSPackage load key.

Exceptions

minimumEdition, productVersion, productName or companyName are null.

Examples

The following Visual C# code applies the ProvideLoadKey attribute to a VSPackage named MyVSPackage.

using Microsoft.VisualStudio.Shell;  
using MSVSIP = Microsoft.VisualStudio.Shell;  
[MSVSIP.ProvideLoadKey(typeof(MyObject))]  
public class MyVSPackage : MSVSIP.Package {}  

Remarks

Important

Packages that target Visual Studio 2010 only do not need a package load key.

Packages that target Visual Studio 2008 and earlier must have a package load key in order to validate and load VSPackages. This includes VSPackages provided by third parties, regardless of whether the hosting version of Visual Studio has a VSIP license.

Note

Visual C# automatically appends the word Attribute to the name of any attribute class. In Visual C# code, refer to this attribute as ProvideLoadKey.

Applies to