已经运行一个Visual Studio中的第二个控制台应用程序 [英] How do I start a second console application in Visual Studio when one is already running

查看:246
本文介绍了已经运行一个Visual Studio中的第二个控制台应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究WCF书中的一些示例。一个解决方案中有一个Host项目和Client项目。两者都是控制台应用程序。主机是启动应用,但客户端应用似乎并未像书中所述那样打开控制台。书中说,在主机运行时,运行客户端。 运行按钮已被禁用,因为它已经在运行。本书的示例中肯定有相同的解决方案和Visual Studio的单个实例。无论如何,我在这里想念什么?我已经使用VS的两个实例完成了此操作,但实际上我从未在单个实例中执行过此操作。总是感谢您的帮助。

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.

干杯,圣地亚哥的
〜ck

Cheers, ~ck in San Diego

推荐答案

在解决方案资源管理器中右键单击宿主项目,然后调试->启动新实例。

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

一旦运行,您可以同样的方法来启动客户端项目,或者,如果客户端项目是启动项目,则可以像平常一样按F5键。

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.

这篇关于已经运行一个Visual Studio中的第二个控制台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆