Creates a new ProvideLoadKeyAttribute.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Syntax
'Declaration
Public Sub New ( _
minimumEdition As String, _
productVersion As String, _
productName As String, _
companyName As String, _
resourceId As Short _
)
'Usage
Dim minimumEdition As String
Dim productVersion As String
Dim productName As String
Dim companyName As String
Dim resourceId As Short
Dim instance As New ProvideLoadKeyAttribute(minimumEdition, _
productVersion, productName, companyName, _
resourceId)
public ProvideLoadKeyAttribute(
string minimumEdition,
string productVersion,
string productName,
string companyName,
short resourceId
)
public:
ProvideLoadKeyAttribute(
String^ minimumEdition,
String^ productVersion,
String^ productName,
String^ companyName,
short resourceId
)
public function ProvideLoadKeyAttribute(
minimumEdition : String,
productVersion : String,
productName : String,
companyName : String,
resourceId : short
)
Parameters
minimumEdition
Type: System.StringThe 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
Type: System.StringThe version of the product that this VSPackage implements.
productName
Type: System.StringName of the product that this VSPackage delivers. Products comprised of multiple VSPackages each need their own PLK.
companyName
Type: System.StringVSIP 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
Type: System.Int16Resource ID for VSPackage load key.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | minimumEdition, productVersion, productName or companyName are nulla null reference (Nothing in Visual Basic). |
Remarks
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.
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 {}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
ProvideLoadKeyAttribute Members
Microsoft.VisualStudio.Shell Namespace