How to: Register a Library with the Object Manager

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at How to: Register a Library with the Object Manager.

Symbols-browsing tools, such as Class View, Object Browser, Call Browser and Find Symbol Results, enable you to view symbols in your project or in external components. The symbols include namespaces, classes, interfaces, methods, and other language elements. The libraries track these symbols and expose them to the Visual Studio object manager that populates the tools with the data.

The object manager keeps track of all available libraries. Each library must register with the object manager before providing symbols for the symbol-browsing tools.

Typically, you register a library when a VSPackage loads. However, it can be done at another time as needed. You unregister the library when the VSPackage shuts down.

To register a library, use the RegisterLibrary method. In the case of managed code library, use the RegisterSimpleLibrary method.

To unregister a library, use the UnregisterLibrary method.

To obtain a reference to the object manager, IVsObjectManager2, pass the SVsObjectManager service ID to GetService method.

To register a library with the object manager

  1. Create a library.

    No code example is currently available or this language may not be supported.
  2. Obtain a reference to an object of the IVsObjectManager2 type and call the RegisterSimpleLibrary method.

    No code example is currently available or this language may not be supported.

To unregister a library with the object manager

  1. Obtain a reference to an object of the IVsObjectManager2 type and call the UnregisterLibrary method.

    No code example is currently available or this language may not be supported.

Legacy Language Service Extensibility
Supporting Symbol-Browsing Tools
How to: Expose Lists of Symbols Provided by the Library to the Object Manager

Show: