Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

ProvideExtenderAttribute Class

Provides an extender for Visual Studio. This class cannot be inherited.

Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell (in microsoft.visualstudio.shell.dll)

[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple=true, Inherited=true)] 
public sealed class ProvideExtenderAttribute : RegistrationAttribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple=true, Inherited=true) */ 
public final class ProvideExtenderAttribute extends RegistrationAttribute
AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple=true, Inherited=true) 
public final class ProvideExtenderAttribute extends RegistrationAttribute

This attribute provides an extender (an object that implements IExtenderProvider) with Visual Studio. To use ProvideExtenderAttribute, place it on a class that inherits from Package or implements IVsPackage.

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

NoteNote

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

NoteNote

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

When to Call

Apply ProvideExtenderAttribute when your VSPackage implements a static extender.

Registry Entries

The following registry entries are created by ProvideExtenderAttribute:

  • <VSROOT>\Extenders\{CATID}\EditorName\

  • <VSROOT>\Extenders\{CATID}\EditorName\@={ExtenderGuid}

Samples

You can find use of the ProvideExtenderAttribute class in the managed AutoExtender Sample (C#). The standard location for this and all other attributes used for automatic registration is adjacent to the implementation of the package class.

System.Object
   System.Attribute
     Microsoft.VisualStudio.Shell.RegistrationAttribute
      Microsoft.VisualStudio.Shell.ProvideExtenderAttribute

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Reference

ProvideExtenderAttribute Members
Microsoft.VisualStudio.Shell Namespace

Other Resources

How to: Register Managed VSPackages

Community Additions

ADD
Show:
© 2015 Microsoft