Visual Studio delay between multiple startup projects?

前端 未结 9 1306
暖寄归人
暖寄归人 2021-02-06 23:31

how to add some delay between startup projects in solution?

\"enter

I want Client

9条回答
  •  独厮守ぢ
    2021-02-06 23:58

    You can set the server project as the single startup project and use this macro to launch the server and the client with a delay:

    Sub DebugServerAndClientWithDelay()
        DTE.Debugger.Go(False)
        System.Threading.Thread.Sleep(2000)
        DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Activate()
        DTE.ActiveWindow.Object.GetItem("SolutionName\ClientProjectName").Select(vsUISelectionType.vsUISelectionTypeSelect)
        DTE.ExecuteCommand("ClassViewContextMenus.ClassViewProject.Debug.Startnewinstance")
    End Sub
    

    You can add a button to your toolbar or use a shortcut key to run this macro.

提交回复
热议问题