ProvideAutoLoadAttribute ProvideAutoLoadAttribute ProvideAutoLoadAttribute ProvideAutoLoadAttribute ProvideAutoLoadAttribute Class

Definition

This attribute registers the package as an extender. The GUID passed in determines what is being extended. The attributes on a package do not control the behavior of the package, but they can be used by registration tools to register the proper information with Visual Studio.

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

Remarks

Apply this attribute to your VSPackage class that inherits from Package or implements IVsPackage to cause your class to be automatically loaded when a specified UI context is active.

This attribute makes your VSPackage an extender (an object which implements IExtenderProvider). The GUID passed to the constructor determines the context in which the package loads.

This attribute class is only used to provide data for external registration tools. It does not have any effect on the runtime behavior of the VSPackage.

Note

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

Note

The GUIDs for the Visual C# and Visual Basic project types are {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} and {F184B08F-C81C-45F6-A57F-5ABD9991F28F}, respectively.

Registry Entries

The following registry entries are created by ProvideAutoLoadAttribute:

  • <VSROOT>\AutoLoadPackages\{ContextGuid}

  • <VSROOT>\AutoLoadPackages\{ContextGuid}\{PackageGuid}=0

Constructors

ProvideAutoLoadAttribute(String) ProvideAutoLoadAttribute(String) ProvideAutoLoadAttribute(String) ProvideAutoLoadAttribute(String) ProvideAutoLoadAttribute(String)

Specify that the package should get loaded when this context is active.

ProvideAutoLoadAttribute(String, PackageAutoLoadFlags) ProvideAutoLoadAttribute(String, PackageAutoLoadFlags) ProvideAutoLoadAttribute(String, PackageAutoLoadFlags) ProvideAutoLoadAttribute(String, PackageAutoLoadFlags) ProvideAutoLoadAttribute(String, PackageAutoLoadFlags)

Specify that the package should get loaded when this context is active.

Properties

Flags Flags Flags Flags Flags

Specifies the options for package auto load entry

LoadGuid LoadGuid LoadGuid LoadGuid LoadGuid

Context Guid which triggers the loading of the package.

TypeId TypeId TypeId TypeId TypeId

Gets the current instance of this attribute.

(Inherited from RegistrationAttribute)

Methods

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

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

(Inherited from RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext) Register(RegistrationAttribute+RegistrationContext) Register(RegistrationAttribute+RegistrationContext) Register(RegistrationAttribute+RegistrationContext) Register(RegistrationAttribute+RegistrationContext)

Called to register this attribute with the given context. The context contains the location where the registration information should be placed. it also contains such as the type being registered, and path information.

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

Unregister this AutoLoad specification.

Applies to