다음을 통해 공유


VCFileConfiguration.Compile 메서드

선택한 파일 또는 참조를 컴파일합니다.

네임스페이스:  Microsoft.VisualStudio.VCProjectEngine
어셈블리:  Microsoft.VisualStudio.VCProjectEngine(Microsoft.VisualStudio.VCProjectEngine.dll)

구문

‘선언
Sub Compile ( _
    forceBuild As Boolean, _
    waitOnBuild As Boolean _
)
void Compile(
    bool forceBuild,
    bool waitOnBuild
)
void Compile(
    [InAttribute] bool forceBuild, 
    [InAttribute] bool waitOnBuild
)
abstract Compile : 
        forceBuild:bool * 
        waitOnBuild:bool -> unit
function Compile(
    forceBuild : boolean, 
    waitOnBuild : boolean
)

매개 변수

  • forceBuild
    형식: Boolean

    강제로 빌드할지 여부를 결정하는 부울 값입니다. 기다리려면 true이고, 그렇지 않으면 false 입니다.

  • waitOnBuild
    형식: Boolean

    빌드되기를 기다릴지 여부를 결정하는 부울 값입니다. 기다리려면 true이고, 그렇지 않으면 false 입니다.

설명

경우 forceBuild 로 설정 된 true, 최신 버전이 아닌 경우 컴파일이 발생 하지 않습니다. 프로젝트를 마우스 오른쪽 단추로 클릭 하 여 사용자 인터페이스 (UI)에서 컴파일을 시작할 때 같은 것 처럼 forceBuild 는 true 및 waitOnBuild 는 false. 빌드 출력에 의존 하는 경우 설정 해야 waitOnBuild 를 true.

예제

' Compiles the first project in the solution.
' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have 
' a Visual C++ project loaded before running this example.
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
Sub Test()
        Dim file As VCFile
        Dim col As IVCCollection
        Dim fileconfig As VCFileConfiguration
        Dim prj As VCProject
        prj = DTE.Solution.Projects.Item(1).Object
        col = prj.Files
        file = col.Item(1)
        col = file.FileConfigurations
        fileconfig = col.Item("Debug|Win32")
        fileconfig.Compile(False, True)
    End Sub

.NET Framework 보안

참고 항목

참조

VCFileConfiguration 인터페이스

Microsoft.VisualStudio.VCProjectEngine 네임스페이스