Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IVsPackage Interface

Initializes a VSPackage in the environment and makes its services available to the environment.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

[GuidAttribute("D4F3F4B1-E900-4E51-ADB3-D532348F83CB")]
[InterfaceTypeAttribute()]
public interface IVsPackage

The IVsPackage type exposes the following members.

  NameDescription
Public methodCloseCloses the VSPackage, releases cached interface pointers, and unadvises event sinks.
Public methodCreateToolEnables the environment to create on-demand tool windows that are implemented by VSPackages.
Public methodGetAutomationObjectEnables a VSPackage to participate in the DTE automation object model.
Public methodGetPropertyPageProffers access to the Tools menu Options and the property pages of the Customize Toolbox dialog boxes.
Public methodQueryCloseEnables a VSPackage that requires user intervention to abort the shutdown process.
Public methodResetDefaultsResets Toolbox defaults.
Public methodSetSiteInitializes a VSPackage with a back pointer to the environment.
Top

This interface must be implemented on all VSPackage classes. Visual Studio uses this interface to call on the VSPackage for services it might provide. Most extensions start out by loading a VSPackage, which is sited to the environment. The calling VSPackage is handed a pointer to a service provider.

Notes to Implementers

Implement IVsPackage whenever you initialize a VSPackage.

If a package needs to block shutdown of the IDE it should implement IVsPackage2.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft