Share via


Propriedade Project.ConfigurationManager

Obtém o objeto de ConfigurationManager para este Project .

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

Sintaxe

'Declaração
ReadOnly Property ConfigurationManager As ConfigurationManager
ConfigurationManager ConfigurationManager { get; }
property ConfigurationManager^ ConfigurationManager {
    ConfigurationManager^ get ();
}
abstract ConfigurationManager : ConfigurationManager
function get ConfigurationManager () : ConfigurationManager

Valor de propriedade

Tipo: EnvDTE.ConfigurationManager
um objeto de ConfigurationManager .

Comentários

O objeto de ConfigurationManager representa as configurações de projeto para um projeto ou item de projeto.Um nome de configuração do projeto e o nome da plataforma identificam exclusivamente cada configuração do projeto.

Exemplos

Sub ConfigurationManagerExample(ByVal dte As DTE2)

    ' Before running this sample, open a project.

    Dim proj As Project = dte.Solution.Item(1)
    Dim manager As ConfigurationManager = proj.ConfigurationManager

    ' Define a new Debug-based configuration for the project.
    Dim configs As Configurations = _
        manager.AddConfigurationRow("MyDebug", "Debug", False)
    Dim config As EnvDTE.Configuration
    Dim msg As String

    ' List all build configurations for the project.
    For Each config In configs
        msg &= config.ConfigurationName
    Next

    MsgBox(proj.Name & " defines the following build configurations:" _
        & vbCrLf & vbCrLf & msg)

End Sub
public void ConfigurationManagerExample(DTE2 dte)
{
    // Before running this sample, open a project.

    Project proj = dte.Solution.Item(1);
    ConfigurationManager manager = proj.ConfigurationManager;

    // Define a new Debug-based configuration for the project.
    Configurations configs = 
        manager.AddConfigurationRow("MyDebug", "Debug", false);
    string msg = "";

    // List all build configurations for the project.
    foreach (EnvDTE.Configuration config in configs)
        msg += config.ConfigurationName;

    MessageBox.Show(proj.Name + 
        " defines the following build configurations:\n\n" + msg);
}

Segurança do .NET Framework

Consulte também

Referência

Project Interface

Namespace EnvDTE

Outros recursos

Como: compilar e executar os exemplos de código de modelo de objeto de automação