This documentation is archived and is not being maintained.

AddIns Collection

Visual Studio .NET 2003

Contains all Add-ins listed in the Add-In Manager dialog box if they are DTE.AddIns, or all of the Add-ins loaded by a particular solution if they are Solution.AddIns.

Class AddIns


An AddIn object provides information about an Add-in to other Add-ins. Only registered Add-ins can be represented by an AddIn object.

The IDTExtensibility2 Interface contains a method called the OnAddInsUpdate Methodthat occurs when the AddIns collection is updated, unless the Add-in is a solution Add-in.


Sub AddInsExample()
   ' For this example to work correctly, there should be an add-in 
   ' available in the Visual Studio .NET environment.
   ' Set object references.
   Dim addincoll As AddIns
   Dim addinobj As AddIn
   ' Register an Add-in, check DTE Add-in count before and after the 
   ' Update.
   addincoll = DTE.AddIns
   MsgBox("AddIns collection parent name: " & addincoll.Parent.Name)
   MsgBox("Number of Add-ins: " & addincoll.Count)
   ' NOTE: Use regsvr32 for Visual C++ .NET, regasm for Visual Basic .NET 
   ' and Visual C# .NET. Also, the pathname used below is an example only.
   Shell("regasm F:\AddIns\RegExplore\Debug\regexplore.dll")
   MsgBox("Number of Add-ins: " & addincoll.Count)
   addinobj = addincoll.Item(1)
End Sub 

See Also

Properties, Methods, and Events