Поделиться через


_dispVCProjectEngineEvents.ProjectBuildFinished - метод

Этот API поддерживает платформу .NET Framework и не должен вызываться непосредственно из вашего кода.

Signifies that the building of a project has been completed.

Пространство имен:  Microsoft.VisualStudio.VCProjectEngine
Сборка:  Microsoft.VisualStudio.VCProjectEngine (в Microsoft.VisualStudio.VCProjectEngine.dll)

Синтаксис

'Декларация
Sub ProjectBuildFinished ( _
    Cfg As Object, _
    warnings As Integer, _
    errors As Integer, _
    Cancelled As Boolean _
)
'Применение
Dim instance As _dispVCProjectEngineEvents
Dim Cfg As Object
Dim warnings As Integer
Dim errors As Integer
Dim Cancelled As Boolean

instance.ProjectBuildFinished(Cfg, warnings, _
    errors, Cancelled)
void ProjectBuildFinished(
    Object Cfg,
    int warnings,
    int errors,
    bool Cancelled
)
void ProjectBuildFinished(
    [InAttribute] Object^ Cfg, 
    [InAttribute] int warnings, 
    [InAttribute] int errors, 
    [InAttribute] bool Cancelled
)
function ProjectBuildFinished(
    Cfg : Object, 
    warnings : int, 
    errors : int, 
    Cancelled : boolean
)

Параметры

  • Cancelled
    Тип: System.Boolean

    Required. True if the build was canceled; otherwise false.

Заметки

Builds invoked by an automation program, or by the Visual Studio integrated development environment (IDE), are normally background processes. ProjectBuildFinished is helpful because it causes your program to pause execution until the build that was started by your program is finished.

Примеры

[Visual Basic]

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub ProjectBuildFinished(ByVal Cfg As Object, _
 ByVal Warnings As Integer, ByVal errors As Integer, _
 ByVal Canceled As Boolean)
        MsgBox(Warnings)
    End Sub
    Sub Main()
        Dim projEngine As VCProjectEngine
        Dim prj As VCProject
        Dim evt As VCProjectEngineEvents
        Dim cfgs As IVCCollection
        Dim cfg As VCConfiguration
        prj = DTE.Solution.Projects.Item(1).Object
        projEngine = prj.VCProjectEngine
        evt = projEngine.Events
        AddHandler evt.ProjectBuildFinished, AddressOf ProjectBuildFinished
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        cfg.Build()
    End Sub
End Module

Разрешения

  • Полное доверие для непосредственно вызывающего метода. Этот член не может быть использован частично доверенным кодом. Дополнительные сведения см. в разделе Using Libraries from Partially Trusted Code.

См. также

Ссылки

_dispVCProjectEngineEvents Интерфейс

_dispVCProjectEngineEvents - члены

Microsoft.VisualStudio.VCProjectEngine - пространство имен