Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Extensibility Architecture (Package API/ Visual Studio Library)

MSDN Extensibility Platfrom Description

Recently I found the above displayed Visual Studio Extensibility Platform chart from microsoft.

Most of the things are clear to me. However, I am wondering about the Package API and the VSL (Visual Studio Library).

I tried to find more, but was not able to find any information.

Things I do not quite understand:
- What exactly is the Package API?
- What exactly is the VSL?
- What is the relation between the InteropAssemblies/ VSL and the Package API? Do the InteropAssemblies wrap the access to the Package API?
- Why should one use the VSL when implementing a native package? What are the benefits?

Does anybody have more information about these subjects or does somebody know some resources?

like image 504
Oliver Vogel Avatar asked Apr 01 '11 12:04

Oliver Vogel


2 Answers

The "Package API" is the set of COM interfaces exposed in the Visual Studio SDK. These are the raw extensibility interfaces for the Visual Studio shell. Almost all the interfaces start with 'IVs' (for example IVsShell, IVsHierarchy, IVsSolution, etc...) If you have the Visual Studio 2010 SDK installed, take a look at the contents of %SDKInstall%\VisualStudioIntegration\Common\IDL for more detail.

You can think of VSL as an ATL-inspired framework for creating native Visual Studio packages. If you create a C++ Visual Studio Package from the included template, the output will be using VSL. The advantage of it is that it minimizes the amount of 'plumbing' code you need to write for a given feature (adding a new ToolWindow for example).

The Interop Assemblies are for .NET/COM interoperability. They provide the right method signatures and structure for managed (C#/VB/F#) code to call into the Package API.

The Visual Studio Extensibility center on MSDN is a good place to start for more links to documentation, blogs, articles, etc... that should help you along.

like image 151
Aaron Marten Avatar answered Oct 21 '22 08:10

Aaron Marten


I know I am answering an old question, but the content in the following book helped me, which adds to Aaron Marten's accepted answer above:

Visual Studio 2010 and .NET 4 Six-in-One (Novak) [2010]

It specifically talks about the Visual Studio Library relying on ATL. The book is old and covers obsolete features such as Macros and Add-ins, but it does describe new concepts as well, such as the Managed Package Framework, and also gives details about Visual Studio internals.

enter image description here

like image 20
Sabuncu Avatar answered Oct 21 '22 09:10

Sabuncu