RegistrationAttribute RegistrationAttribute RegistrationAttribute RegistrationAttribute Class


An abstract class for VSPackage registration. The RegistrationAttribute class allows new registration information to be added without changing the registration tools.

public ref class RegistrationAttribute abstract : Attribute
public abstract class RegistrationAttribute : Attribute
type RegistrationAttribute = class
    inherit Attribute
Public MustInherit Class RegistrationAttribute
Inherits Attribute


When to Implement

Derive a registration attribute from RegistrationAttribute to create a class that makes specialized registry entries when applied to your Package-derived class or a class that implements IVsPackage.

Basic Usage

Attribute classes that provide VSPackage registration information. Regpkg.exe or other registration tools must derive from and implement RegistrationAttribute. For more information, see Registering VSPackages.

RegistrationAttribute is an abstract attribute class that enables VSPackage developers to add registration attribute classes without needing to change the registration tools.

Attribute classes that provide registration information to regpkg.exe or other registration tools must derive from RegistrationAttribute, and must implement the Register and Unregister abstract methods.

Registration tools such as regpkg.exe must implement the classes RegistrationAttribute.Key and RegistrationAttribute.RegistrationContext.


RegistrationAttribute() RegistrationAttribute() RegistrationAttribute() RegistrationAttribute()

Initializes a new instance of the class.


TypeId TypeId TypeId TypeId

Gets the current instance of this attribute.


GetPackageRegKeyPath(Guid) GetPackageRegKeyPath(Guid) GetPackageRegKeyPath(Guid) GetPackageRegKeyPath(Guid)

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

Register(RegistrationAttribute+RegistrationContext) Register(RegistrationAttribute+RegistrationContext) Register(RegistrationAttribute+RegistrationContext) Register(RegistrationAttribute+RegistrationContext)

Registers this VSPackage with a given context, when called by an external registration tool such as regpkg.exe. For more information, see Registering VSPackages.

Unregister(RegistrationAttribute+RegistrationContext) Unregister(RegistrationAttribute+RegistrationContext) Unregister(RegistrationAttribute+RegistrationContext) Unregister(RegistrationAttribute+RegistrationContext)

Called to unregister this attribute with the given context.

Applies to