Project.ConfigurationManager プロパティ

この ProjectConfigurationManager オブジェクトを取得します。

名前空間:  EnvDTE
アセンブリ:  EnvDTE (EnvDTE.dll 内)

構文

'宣言
ReadOnly Property ConfigurationManager As ConfigurationManager
    Get
ConfigurationManager ConfigurationManager { get; }
property ConfigurationManager^ ConfigurationManager {
    ConfigurationManager^ get ();
}
abstract ConfigurationManager : ConfigurationManager
function get ConfigurationManager () : ConfigurationManager

プロパティ値

型: EnvDTE.ConfigurationManager
ConfigurationManager オブジェクト。

解説

ConfigurationManager オブジェクトは、プロジェクトまたはプロジェクト項目のプロジェクト構成を表します。 プロジェクト構成名とプラットフォーム名によって、各プロジェクト構成が一意に識別されます。

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);
}

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

Project インターフェイス

EnvDTE 名前空間

その他の技術情報

方法 : オートメーション オブジェクト モデルのコード例をコンパイルおよび実行する