当一个控制台应用程序已在运行时,如何在 Visual Studio 中启动第二个控制台应用程序
我正在研究 WCF 书中的一些示例。单个解决方案中有一个主机项目和客户端项目。两者都是控制台应用程序。主机是启动应用程序,但客户端应用程序似乎没有像书中所说的那样打开控制台。书上说,当主机运行时,运行客户端。 “运行”按钮已被禁用,因为它已经在运行。书中的示例肯定将它们放在同一个解决方案和 Visual Studio 的单个实例中。无论如何,我在这里缺少什么?我已经用两个 VS 实例完成了此操作,但我确实从未在单个实例中这样做过。任何帮助总是值得赞赏。
干杯, 〜ck在圣地亚哥
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您还可以在调试时同时启动两个控制台应用程序。
You can also make both console apps start at once when you debug.
右键单击解决方案资源管理器中的宿主项目,然后转到调试 ->启动新实例。
一旦运行,您可以执行相同的操作来启动客户端项目,或者,如果客户端项目是启动项目,您可以像平常一样按 F5。
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.