Share via


PackageRegistrationAttribute Class

Definition

Modify your class that implements IVsPackage by using this attribute so that the registration tool, RegPkg.exe, will look for additional attributes. For more information, see Registering VSPackages.

public ref class PackageRegistrationAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
public ref class PackageRegistrationAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
public sealed class PackageRegistrationAttribute : Microsoft.VisualStudio.Shell.RegistrationAttribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)>]
type PackageRegistrationAttribute = class
    inherit RegistrationAttribute
Public NotInheritable Class PackageRegistrationAttribute
Inherits RegistrationAttribute
Inheritance
PackageRegistrationAttribute
Attributes

Remarks

RegPkg.exe uses C# reflection to determine the attributes that modify your assembly-implemented package. RegPkg.exe then evaluates each attribute by using information that is specific to the current installation, and then creates registry entries that describe the package to Visual Studio. If your class inherits from the Managed Package Framework (MPF) class Package, this attribute is already included. If you create your own class that implements IVsPackage, manually modify your class by using one PackageRegistrationAttribute or the package will not load.

Constructors

PackageRegistrationAttribute()

Initializes an instance of this attribute.

Properties

AllowsBackgroundLoading

Package is safe to load on a background thread.

RegisterUsing

Gets or sets the method of registration.

SatellitePath

To specify a resource dll located in a different location then the default, set this property. This can be useful if your package is installed in the GAC. If this is not set, the directory where the package is located will be use.

Note that the dll should be located at the following path: SatellitePath\lcid\PackageDllNameUI.dll

TypeId

Override the TypeID property in order to let the RegistrationAttribute derived classes to work with System.ComponentModel.TypeDescriptor.GetAttributes(...). An attribute derived from this one will have to override this property only if it needs a better control on the instances that can be applied to a class.

(Inherited from RegistrationAttribute)
UseManagedResourcesOnly

For managed resources, there should not be a native ui dll registered.

Methods

GetPackageRegKeyPath(Guid)

Gets the registry path (relative to the registry root of the application) of the VSPackage.

(Inherited from RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

Creates registry entries that correspond to the value of this attribute.

Unregister(RegistrationAttribute+RegistrationContext)

Removes attribute-specific registry entries.

Applies to