Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

AddIn.Remove Method

Removes the add-in from the collection of add-ins and makes it unavailable.

Namespace: EnvDTE
Assembly: EnvDTE (in envdte.dll)

void Remove ()
void Remove ()
function Remove ()

This removes an add-in from the list of add-ins in the Add-In Manager dialog box. The Remove method applies only to add-ins that load with the solution. The Remove method fails on items in the collection associated with the DTE object.

Sub RemoveExample()
   ' Set object references.
   Dim addincoll As AddIns
   Dim addinobj As AddIn
   Dim abc As AddIn
   ' Register an add-in.
   addincoll = AddIns
   Shell("regsvr32 F:\AddIns\RegExplore\Debug\regexplore.dll")
   addinobj = addincoll.Item(1)

   ' Connect the add-in if it is not already connected.
   If addinobj.Connected = False Then
      addinobj.Connected = True
   End If

   ' Add an add-in to the Add-In Manager dialog box, then remove it.
   abc = ProjectSolution().AddIns.Add(addinobj.ProgID, addinobj.Description, addinobj.Name, False)
End Sub

Community Additions

© 2015 Microsoft