_dispVCProjectEngineEvents.ProjectBuildStarted Method
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Signifies that the building of a project has begun.
Namespace: Microsoft.VisualStudio.VCProjectEngine
Assembly: Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
Syntax
'宣告
Sub ProjectBuildStarted ( _
Cfg As Object _
)
void ProjectBuildStarted(
Object Cfg
)
void ProjectBuildStarted(
[InAttribute] Object^ Cfg
)
abstract ProjectBuildStarted :
Cfg:Object -> unit
function ProjectBuildStarted(
Cfg : Object
)
Parameters
- Cfg
Type: System.Object
Required. The configuration.
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
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.