ProvideAutoLoadAttribute Class
Apply this attribute to your VSPackage class to cause it to be automatically loaded when a specified UI context is active. This class cannot be inherited.
Assembly: Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)
System.Attribute
Microsoft.VisualStudio.Shell.RegistrationAttribute
Microsoft.VisualStudio.Shell.ProvideAutoLoadAttribute
| Name | Description | |
|---|---|---|
![]() | ProvideAutoLoadAttribute(String) | Returns a new instance of this attribute with the specified cmdUiContextGuid. |
![]() | ProvideAutoLoadAttribute(String, PackageAutoLoadFlags) | Initializes a new instance of ProvideAutoloadAttribute in the specified UI context with the specified options. |
| Name | Description | |
|---|---|---|
![]() | Flags | Gets the autoload options. |
![]() | LoadGuid | Returns the UI context GUID which will cause your package to load. |
![]() | TypeId | Gets the current instance of this attribute.(Inherited from RegistrationAttribute.) |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | (Inherited from Attribute.) |
![]() | GetHashCode() | (Inherited from Attribute.) |
![]() | GetType() | (Inherited from Object.) |
![]() | IsDefaultAttribute() | (Inherited from Attribute.) |
![]() | Match(Object) | (Inherited from Attribute.) |
![]() | Register(RegistrationAttribute.RegistrationContext) | Provides registration information about a VSPackage when called by an external registration tool like regpkg.exe. (Overrides RegistrationAttribute.Register(RegistrationAttribute.RegistrationContext).) |
![]() | ToString() | (Inherited from Object.) |
![]() | Unregister(RegistrationAttribute.RegistrationContext) | Removes registration information about a VSPackage when called by an external registration tool like regpkg.exe. (Overrides RegistrationAttribute.Unregister(RegistrationAttribute.RegistrationContext).) |
| Name | Description | |
|---|---|---|
![]() ![]() | _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() | _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() | _Attribute.GetTypeInfoCount(UInt32) | (Inherited from Attribute.) |
![]() ![]() | _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) | (Inherited from Attribute.) |
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. |
The following registry entries are created by ProvideAutoLoadAttribute:
<VSROOT>\AutoLoadPackages\{ContextGuid}
<VSROOT>\AutoLoadPackages\{ContextGuid}\{PackageGuid}=0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.




