Share via


_dispVCProjectEngineEvents.ProjectBuildFinished Method

Definition

Signifies that the building of a project has been completed.

This API supports the product infrastructure and is not intended to be used directly from your code.

public:
 void ProjectBuildFinished(System::Object ^ Cfg, int warnings, int errors, bool Cancelled);
public:
 void ProjectBuildFinished(Platform::Object ^ Cfg, int warnings, int errors, bool Cancelled);
void ProjectBuildFinished(winrt::Windows::Foundation::IInspectable const & Cfg, int warnings, int errors, bool Cancelled);
[System.Runtime.InteropServices.DispId(283)]
public void ProjectBuildFinished (object Cfg, int warnings, int errors, bool Cancelled);
[<System.Runtime.InteropServices.DispId(283)>]
abstract member ProjectBuildFinished : obj * int * int * bool -> unit
Public Sub ProjectBuildFinished (Cfg As Object, warnings As Integer, errors As Integer, Cancelled As Boolean)

Parameters

Cfg
Object

Required. The configuration.

warnings
Int32

Required. The warnings.

errors
Int32

Required. The errors.

Cancelled
Boolean

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

Attributes

Examples

[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  

Remarks

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.

Applies to