VCPostBuildEventTool.CommandLine 属性

定义

获取或设置用于运行生成事件工具的命令行。

public:
 property System::String ^ CommandLine { System::String ^ get(); void set(System::String ^ value); };
public:
 property Platform::String ^ CommandLine { Platform::String ^ get(); void set(Platform::String ^ value); };
[System.Runtime.InteropServices.DispId(1)]
public string CommandLine { [System.Runtime.InteropServices.DispId(1)] get; [System.Runtime.InteropServices.DispId(1)] set; }
[<System.Runtime.InteropServices.DispId(1)>]
[<get: System.Runtime.InteropServices.DispId(1)>]
[<set: System.Runtime.InteropServices.DispId(1)>]
member this.CommandLine : string with get, set
Public Property CommandLine As String

属性值

String

用于运行生成事件工具的命令行。

属性

示例

有关如何编译和运行此示例的信息,请参阅 如何:编译项目模型扩展性的示例代码

下面的示例在 VCPostBuildEventTool CommandLine 集成开发环境 (IDE) 中修改对象的属性:

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

Public Module Module1  
    Sub Test()  
        Dim prj As VCProject  
        Dim cfgs, tools As IVCCollection  
        Dim cfg As VCConfiguration  
        Dim tool As VCPostBuildEventTool  
        prj = DTE.Solution.Projects.Item(1).Object  
        cfgs = prj.Configurations  
        cfg = cfgs.Item(1)  
        tool = cfg.Tools("VCPostBuildEventTool")  
        tool.CommandLine = "your command"  
    End Sub  
End Module  

注解

有关详细信息,请参阅指定生成事件

适用于