SolutionConfiguration2.DTE Propriedade
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Obtém o objeto de extensibilidade de nível superior.
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
Valor da propriedade
Um objeto DTE.
Implementações
- Atributos
Exemplos
Este exemplo exibe o nome do projeto ativo, obtido por meio do DTE objeto, para o primeiro item. Abra um projeto no Visual Studio IDE (ambiente de desenvolvimento integrado) antes de executar este exemplo.
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());
}
}
Comentários
No Visual Studio, o DTE objeto é a raiz do modelo de automação, que outros modelos de objeto geralmente chamam de "Application".