_dispVCProjectEngineEvents.ProjectBuildStarted(Object) Method

Definition

Signifies that the building of a project has begun.

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

public:
 void ProjectBuildStarted(System::Object ^ Cfg);
public:
 void ProjectBuildStarted(Platform::Object ^ Cfg);
void ProjectBuildStarted(winrt::Windows::Foundation::IInspectable const & Cfg);
[System.Runtime.InteropServices.DispId(282)]
public void ProjectBuildStarted (object Cfg);
[<System.Runtime.InteropServices.DispId(282)>]
abstract member ProjectBuildStarted : obj -> unit
Public Sub ProjectBuildStarted (Cfg As Object)

Parameters

Cfg
Object

Required. The configuration.

Attributes

Examples

[Visual Basic]

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

Public Module Module1  
    Sub ProjectBuildStarted(ByVal Cfg As Object)  
        Dim myCfg As VCConfiguration  
        myCfg = Cfg  
        MsgBox(myCfg.ConfigurationName)  
    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.ProjectBuildStarted, AddressOf ProjectBuildStarted  
        cfgs = prj.Configurations  
        cfg = cfgs.Item(1)  
        cfg.Build()  
    End Sub  
End Module  

Applies to