다음을 통해 공유


Configuration.IsBuildable 속성

프로젝트 또는 프로젝트 항목 구성을 빌드할 수 있는지 여부를 가져옵니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
ReadOnly Property IsBuildable As Boolean
bool IsBuildable { get; }
property bool IsBuildable {
    bool get ();
}
abstract IsBuildable : bool with get
function get IsBuildable () : boolean

속성 값

형식: Boolean
프로젝트 또는 프로젝트 항목을 빌드해야 하면 true를 나타내고 그렇지 않으면 false를 나타내는 부울 값입니다.

설명

프로젝트 또는 프로젝트 항목을 빌드할지 여부를 나타내려면 해당 프로젝트 또는 프로젝트 항목을 지정된 솔루션 구성을 위해 빌드되고 컨텍스트를 포함하는 구성으로 SolutionContext에 지정합니다.

예제

public void CodeExample(DTE2 dte, AddIn addin)
{   // Make sure you have a solution loaded into Visual Studio
    // before running the following example.
    try
    {
        Project prj;
        Configuration config;
        if (dte.Solution.Projects.Count > 0)
        {
            prj = dte.Solution.Projects.Item(1);
            config = prj.ConfigurationManager.ActiveConfiguration;
            // Determine and show whether the active configuration is buildable.
            MessageBox.Show(config.IsBuildable.ToString());
        }
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

.NET Framework 보안

참고 항목

참조

Configuration 인터페이스

EnvDTE 네임스페이스

기타 리소스

방법: 자동화 개체 모델 코드의 예제 컴파일 및 실행