Removes the add-in from the collection of add-ins and makes it unavailable.
Assembly: EnvDTE (in EnvDTE.dll)
This removes an add-in from the list of add-ins in the Add-In Manager dialog box. The method applies only to add-ins that load with the solution. The 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") addincoll.Update() 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) ProjectSolution().AddIns.Item(1).Remove() End Sub
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.