Visual Studio: Create a VS.NET Add-in
This sample shows some how to create a VS.NET Add-In using Visual Studio
.NET. It also demonstrates how to check whether or not an add-in in
currently installed and available.
Featured Highlights:
This how-to demonstrates many of the important features of Visual Studio .NET
Add-Ins. In particular, it covers:
-
Implementing the Extensibility.IDTExtensibility2 interface.
-
Installing an Add-in using an Microsoft Installer file (MSI), or changing the
registry to install the Add-in using a REG file.
-
React to Visual Studio events to output event messages to a log file.
-
Log File location is [SystemRoot]\IDELOG.txt
Requirements:
-
Trial or Release version of Visual Studio .NET Professional or greater.
-
Windows 2000 or Windows XP
Running the Sample:
To run the sample:
-
Doubleclick the How-To Create A VS.NET Add-in.sln
file.
-
Run the HowTo_ExampleAddInSetup.msi installation file, or run
the ReCreateCommands.reg
registry file.
-
Run the application and examine the frmMain
code to learn how to iterate through the Add-ins collection.
-
Start the Add-in by using Tools -> Add-in Manager
and selecting the check-box next to "How To Example Add-in".
-
Examine the code in the sample to understand how the code works.
Notes:
To best understand the process of creating a VS.NET Add-in, use the Wizard
provided by Visual Studio .NET. The wizard generates the majority of the code
necessary. Then, simply hook up to the events you want to react to.
Additional Projects in this Sample
HowTo_ExampleAddIn - This project contains the code that
defines the Add-in.
VbNetHowTo_ExampleAddInSetup - This project contains the setup
project that creates the MSI file to deploy the applicatoin.
See Also:
Creating Add-ins and Wizards,
Automation and Extensibility Reference,
IDTExtensibility2 Interface