Export (0) Print
Expand All

Loading VSPackages

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

VSPackages are loaded into memory only when their accompanying functionality is required to complete a process. This feature is called delayed loading. Visual Studio uses delayed loading whenever possible to improve performance.

A VSPackage is loaded, for example, when the following conditions are true:

  • Visual Studio requires a project factory that a VSPackage implements.

  • Visual Studio requests a service or editor that a VSPackage implements.

Autoloading a VSPackage

VSPackages can be set to autoload when a particular CMDUICONTEXT GUID is turned on. A debugger VSPackage, for example, might register itself to be autoloaded with the following CmdUIGuids:

For more information, see How to: Autoload a VSPackage (C#)

Forcing a VSPackage to Load

Under some circumstances, a VSPackage may have to force another VSPackage to be loaded. . For example, a lightweight VSPackage might load a larger VSPackage in a context that is not available as a CMDUIContext.

You can use the LoadPackage method to force a VSPackage to load. For more information, see How to: Force a VSPackage to Load (C#).

See Also

Community Additions

© 2015 Microsoft