
378Microsoft Visual Studio 2010: A Beginner’s Guide
methods that are numbered, such as the IDTExtensibility and IDTExtensibility2, where IDTExtensibility2 is a more recent version with additional members. I’ll explain what the IDTExtensibility2 interface does later, but what you should get out of this example is how each version of the EnvDTE assemblies manages newer versions of code. This scheme promotes the addition of new functionality for each version of VS without sacrificing backward compatibility.
The Connect class contains the code that interacts with VS to make an
The other items of note in this project are the files with the *.AddIn extensions. These are the deployment files. There was a time when you were required to go into the Windows registry to configure an
Additionally, one of the *.AddIn files has a shortcut arrow, which is a special shortcut to a file used for debugging. If you look at the properties for this shortcut file, you’ll notice that it points at your Documents\Visual Studio 2010\Addins\folder, which is a deployment location. Whenever you debug this application, VS uses the debugging *.AddIn file to load the
Now that you know the key elements of an
Drilling into the Connect Class
The Connect class implements two interfaces, IDTExtensibility2 and IDTCommandTarget, and contains several members. Before examining the code, you’ll learn about the interfaces, their members, and purpose.
The purpose of the interfaces (IDTExtensibility2 and IDTCommandTarget) is to help manage the lifetime of the