_dispVCProjectEngineEvents.ProjectBuildStarted 方法

此 API 支持 .NET Framework 基础结构,不适合在代码中直接使用。

指示项目生成已开始。

命名空间:  Microsoft.VisualStudio.VCProjectEngine
程序集:  Microsoft.VisualStudio.VCProjectEngine(在 Microsoft.VisualStudio.VCProjectEngine.dll 中)

语法

声明
Sub ProjectBuildStarted ( _
    Cfg As Object _
)
void ProjectBuildStarted(
    Object Cfg
)
void ProjectBuildStarted(
    [InAttribute] Object^ Cfg
)
abstract ProjectBuildStarted : 
        Cfg:Object -> unit 
function ProjectBuildStarted(
    Cfg : Object
)

参数

示例

[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 安全性

请参见

参考

_dispVCProjectEngineEvents 接口

Microsoft.VisualStudio.VCProjectEngine 命名空间