How do I start a second console application in Visual Studio when one is already running

瘦欲@ 提交于 2019-12-22 01:39:54

问题


I am working through some examples in a WCF book. There is a Host project and Client project within a single solution. Both are console applications. The Host is the startup app, but the Client app doesn't seem to open the Console like the book says. Book says while the Host is running, run the Client. The Run button is disabled tho as it is already running. The book example definitely has them in the same solution and a single instance of Visual Studio. Anyways, what am I missing here? I have done this with two instances of VS, but I truly have never does this in a single instance. Any help is always appreciated.

Cheers, ~ck in San Diego


回答1:


Right-Click on the host project in solution explorer then go to debug -> start new instance.

Once it is running you can do the same thing to start the client project, or, you can press F5 like normal if the client project is the startup project.




回答2:


You can also make both console apps start at once when you debug.

  • In Solution Explorer, right-click the solution, and select Properties.
  • In the left pane, select Common Properties | Startup Project.
  • Then, on the right, select Multiple Startup Projects.
  • You can set any number of your projects to start - with or without debugging.


来源:https://stackoverflow.com/questions/2565153/how-do-i-start-a-second-console-application-in-visual-studio-when-one-is-already

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!