Share via


_DTE.AddIns Property

Gets the AddIns collection, which contains all currently available Add-ins.

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

Syntax

'Declaration
ReadOnly Property AddIns As AddIns
AddIns AddIns { get; }
property AddIns^ AddIns {
    AddIns^ get ();
}
abstract AddIns : AddIns
function get AddIns () : AddIns

Property Value

Type: EnvDTE.AddIns
A AddIns collection.

Remarks

The add-ins returned do not appear in the AddIns collection unless they are registered to appear there.

Examples

Sub AddInsExample(ByVal dte As DTE2)

    ' Display all add-ins.
    Dim addIn As AddIn
    Dim msg As String = "Available add-ins:" & vbCrLf & vbCrLf

    For Each addIn In dte.AddIns
        msg &= "    " & addIn.Name

        If addIn.Connected Then
            msg &= " (Loaded)" & vbCrLf
        Else
            msg &= " (Not Loaded)" & vbCrLf
        End If
    Next

    MsgBox(msg)

End Sub
public void AddInsExample(DTE2 dte)
{
    // Display all add-ins.
    string msg = "Available add-ins:\n\n";

    foreach (AddIn addIn in dte.AddIns)
    {
        msg += "    " + addIn.Name;

        if (addIn.Connected)
            msg += " (Loaded)\n";
        else
            msg += " (Not Loaded)\n";
    }
    MessageBox.Show(msg);
}

.NET Framework Security

See Also

Reference

_DTE Interface

EnvDTE Namespace

Other Resources

How to: Compile and Run the Automation Object Model Code Examples