VCProjectConfigurationProperties.Command 属性

如果 Remote 指定本地调试并且 Attach 为 false,则 Command 属性将指定要在调用调试器时启动的可执行文件。 如果 Attach 为 true 并且 Remote 指定了远程调试,则 Command 属性将指定在调用调试器时调试进程应附加到的进程。

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

语法

声明
Property Command As String
string Command { get; set; }
property String^ Command {
    String^ get ();
    void set (String^ value);
}
abstract Command : string with get, set
function get Command () : String 
function set Command (value : String)

属性值

类型:String
要在调用调试器时启动的可执行文件或调用调试器时调试进程应附加到的进程

备注

有关更多信息,请参见C++ 调试配置的项目设置

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

示例

[Visual Basic]

下面的代码示例修改开发环境中的 Command 属性:

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

Public Module Module1
    Sub Test()
        Dim mystring As String
        Dim prj As VCProject
        Dim cfgs, tools As IVCCollection
        Dim cfg As VCConfiguration
        Dim tool As VCDebugSettings
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.DebugSettings
        tool.Command = "test.exe"
    End Sub
End Module

.NET Framework 安全性

请参阅

参考

VCProjectConfigurationProperties 接口

Microsoft.VisualStudio.VCProject 命名空间