本文翻译自:Running two projects at once in Visual Studio
I created a solution in Visual C# 2010 Express that contains two projects: one is the client, the other is the server. 我在Visual C#2010 Express中创建了一个包含两个项目的解决方案:一个是客户端,另一个是服务器。 I would like to debug both at the same time, but I can only seem to run one of the projects during debugging. 我想同时调试这两个,但我似乎只能在调试期间运行其中一个项目。
Is there a way to run both at once? 有没有办法同时运行两个?
#1楼
参考:https://stackoom.com/question/G9Z5/在Visual-Studio中一次运行两个项目
#2楼
Go to Solution properties → Common properties → Startup Project and select Multiple startup projects. 转到解决方案属性→公共属性→启动项目,然后选择多个启动项目。
#3楼
Max has the best solution for when you always want to start both projects, but you can also right click a project and choose Debug > Start New Instance. 当您总是想要启动这两个项目时,Max拥有最佳解决方案,但您也可以右键单击项目并选择“调试”>“启动新实例”。
This is an option when you only occasionally need to start the second project or when you need to delay the start of the second project (maybe the server needs to get up and running before the client tries to connect, or something). 当您偶尔需要启动第二个项目或需要延迟第二个项目的启动时(这可能是服务器需要在客户端尝试连接之前启动并运行,或者其他东西),这是一个选项。