SolutionConfiguration2.DTE Eigenschaft

Definition

Ruft das Erweiterbarkeitsobjekt der obersten Ebene ab.

public:
 property EnvDTE::DTE ^ DTE { EnvDTE::DTE ^ get(); };
public:
 property EnvDTE::DTE ^ DTE { EnvDTE::DTE ^ get(); };
[System.Runtime.InteropServices.DispId(1)]
public EnvDTE.DTE DTE { [System.Runtime.InteropServices.DispId(1)] get; }
[<System.Runtime.InteropServices.DispId(1)>]
[<get: System.Runtime.InteropServices.DispId(1)>]
member this.DTE : EnvDTE.DTE
Public ReadOnly Property DTE As DTE

Eigenschaftswert

DTE

Ein DTE-Objekt.

Implementiert

DTE
Attribute

Beispiele

Dieses Beispiel zeigt den Namen des aktiven Projekts, das über das-Objekt abgerufen wurde DTE , für das erste Element an. Öffnen Sie ein Projekt in der Visual Studio integrierten Entwicklungsumgebung (Integrated Development Environment, IDE), bevor Sie dieses Beispiel ausführen.

Imports EnvDTE  
Imports EnvDTE80  
Sub SolutionConfigurationDTEExample(ByVal dte As DTE2)  
    Try  
        Dim builder As SolutionBuild = _  
        _applicationObject.Solution.SolutionBuild  
        Dim config As SolutionConfiguration2  
            config = CType(builder.SolutionConfigurations.Item(1) _  
        , SolutionConfiguration2)  
        MsgBox("The active solution project, obtained through the  _  
        DTE object, is: "  _  
        & config.DTE.ActiveSolutionProjects.ToString())  
    Catch ex As System.Exception  
        MsgBox(ex.ToString)  
    End Try  
End Sub  
using EnvDTE;  
using EnvDTE80;  
using System.Windows.Forms;  
public void SolutionConfigurationDTEExample(DTE2 dte)  
{  
    try  
    {  
        SolutionBuild builder =  
 _applicationObject.Solution.SolutionBuild;  
        SolutionConfiguration2 config;  
        config =  
 (SolutionConfiguration2)builder.SolutionConfigurations.Item(1);  
        MessageBox.Show("The active solution project, obtained through  
 the DTE object, is: " + config.DTE.ActiveSolutionProjects.ToString());  
    }  
    catch(SystemException ex)  
    {  
        MessageBox.Show(ex.ToString());  
    }  
}  

Hinweise

In Visual Studio ist das DTE Objekt der Stamm des Automatisierungs Modells, das von anderen Objekt Modellen oft als "Application" bezeichnet wird.

Gilt für