0

我正在制作更改调试命令行的 VS 插件。这部分有效,但我需要在更改后开始调试。

如何从加载项开始调试?

mybe 这个功能的东西可能会有所帮助

Function GetCommandArgsProperty() As EnvDTE.Property
    Dim solution As Solution
    Dim project As Project
    Dim sb As SolutionBuild
    Dim cm As ConfigurationManager
    Dim config As Configuration
    Dim properties As Properties
    Dim prop As EnvDTE.Property

    solution = _applicationObject.Solution
    sb = solution.SolutionBuild

    For Each str As String In sb.StartupProjects
        project = solution.Item(str)
        cm = project.ConfigurationManager
        config = cm.ActiveConfiguration
        properties = config.Properties

        For Each prop In properties
            If prop.Name = "CommandArguments" Then
                Return prop
            End If
        Next
    Next
End Function
4

1 回答 1

1

让它工作

        Dim dte As EnvDTE.DTE = GetService(GetType(EnvDTE.DTE))
        dte.Solution.SolutionBuild.Run()
于 2013-10-31T22:33:22.810 回答