SolutionBuild.ActiveConfiguration プロパティ

更新 : 2007 年 11 月

現在アクティブになっている SolutionConfiguration オブジェクトを取得します。

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

構文

'宣言
ReadOnly Property ActiveConfiguration As SolutionConfiguration
'使用
Dim instance As SolutionBuild
Dim value As SolutionConfiguration

value = instance.ActiveConfiguration
SolutionConfiguration ActiveConfiguration { get; }
property SolutionConfiguration^ ActiveConfiguration {
    SolutionConfiguration^ get ();
}
function get ActiveConfiguration () : SolutionConfiguration

プロパティ値

型 : EnvDTE.SolutionConfiguration

SolutionConfiguration オブジェクト。

解説

SolutionConfiguration オブジェクトは、ソリューション ビルド操作に使用される現在のソリューション構成を表します。

public void CodeExample(DTE2 dte)
{  
    try
    {
        SolutionBuild sb = dte.Solution.SolutionBuild;
        SolutionConfiguration sc = sb.ActiveConfiguration;
        vsBuildState vsBS;
        string msg = "Return relative path to startup projects: ";
        foreach (String s in (Array)sb.StartupProjects)
        {
            msg += "\n   " + s;
        }
        msg += "\nSolutionConfiguration: " + sc.Name;
        vsBS = sb.BuildState;
        if (vsBS == vsBuildState.vsBuildStateDone)
            msg += "\nA build has occurred.";
        else if (vsBS == vsBuildState.vsBuildStateInProgress)
            msg += "\nA build is in progress.";
        else msg += "\nA build has not occurred.";

        MessageBox.Show(msg);
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

アクセス許可

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

参照

参照

SolutionBuild インターフェイス

SolutionBuild メンバ

EnvDTE 名前空間