AddIn.Remove Method

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

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


Sub Remove
Dim instance As AddIn

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

.NET Framework Security

See Also


AddIn Interface

AddIn Members

EnvDTE Namespace