The basic concept of the SSMS add-in is the same as Visual
Studio add-in. Before I get into the concept behind SSMS Add-In, I would like
to present some basic concepts of the Visual Studio Add-In.
The steps involved in creating the Visual Studio Add-In are:
Click on Create Project in Visual Studio 2005.
The template for Visual Studio 2005 Add-In is located under
Other Project Types->Extensibility->Visual Studio Add-In.
Figure 1

Please provide a name for the project.
The 6 step wizard will walk you through creating the Add-in.
Wizard Step 1: Select a Programming Language. You can select
your preferred language. For my project I will select Visual Basic.
Figure 2

Wizard Step 2: Select an application host. The options are
to create Microsoft Visual Studio 2005, Microsoft Visual Studio 2005 Macros or
both. The basic idea is whether you want to create an Add-In or a Macro. Keep
in mind the Macros can be converted to an Add-In.
Figure 3

Wizard Step 3: Enter a Name and Description. You can provide
a unique name and description for the add-in.
Figure 4

Wizard Step 4: Choose Add-In Options. The options are
whether to create command bar UI or Add-In when the host application starts and
the add-in will never put up modal UI. The options are self explanatory.
Figure 5

Wizard Step 5: Choosing "Help About" Information.
If you want to have your company's information in he About box then you can
select this option.
Figure 6

Wizard Step 6: Summary. This will just provide the options
you have selected. On clicking finish the wizard will create the project for
you.
Figure 7

Please note that the Wizard has created a class called
connect which implements IDTEExtensibility2. I will explain the connect class
in a little bit.
Also, take a look at the References tab and you will notice
the following references have been added:
EnvDTE
EnvDTE80
Extensibility
All the above steps are also the same steps for creating an
add-in for SSMS.