在 Visual Studio 中同时运行两个项目

发布于 2024-09-26 01:48:27 字数 122 浏览 0 评论 0原文

我在 Visual C# 2010 Express 中创建了一个解决方案,其中包含两个项目:一个是客户端,另一个是服务器。我想同时调试这两个项目,但在调试过程中我似乎只能运行其中一个项目。

有没有办法同时运行两者?

I created a solution in Visual C# 2010 Express that contains two projects: one is the client, the other is the server. 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

愛放△進行李 2024-10-03 01:48:27

转到解决方案属性 → 通用属性启动项目,然后选择多个启动项目

解决方案属性对话框

Go to Solution properties → Common PropertiesStartup Project and select Multiple startup projects.

Solution properties dialog

給妳壹絲溫柔 2024-10-03 01:48:27

当您总是想启动这两个项目,但您也可以右键单击一个项目并选择菜单调试启动新实例

当您只是偶尔需要启动第二个项目或需要延迟启动第二个项目时(也许服务器需要在客户端尝试连接之前启动并运行,或者其他什么),这是一个选项。

Max has the best solution for when you always want to start both projects, but you can also right click a project and choose menu DebugStart New Instance.

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).

冷了相思 2024-10-03 01:48:27

如果项目位于不同的解决方案中,您将无法在同一 Visual Studio 实例中运行它们。

我只是打开多个 Visual Studio 实例。在每个实例中,我都会打开我需要的不同项目(在不同的解决方案中)。

If the projects are in different solutions, you won't be able to run them in the same Visual Studio instance.

I just open multiple Visual Studio instances. In each instance, I open the different project (in a different solution) that I need.

久夏青 2024-10-03 01:48:27

在预览版 17.11.0 Preview 4.0 中,他们添加了创建配置文件以根据配置运行多个项目的功能,要启用它,只需

工具 -> 即可。管理预览功能

现在您可以选择添加配置文件

Tools/ManageOptions

  • 配置启动项目

启动/配置启动项目

添加您的启动配置文件

根据您的项目设置配置

In the Preview version 17.11.0 Preview 4.0 they added the capability to create profiles to run multiple projects based on configuration, to enable it is to

Tools -> Manage Preview Features

now you have the option to add profiles

Tools/ManageOptions

  • Configure Startup Projects

Start/Configure Startup Projects

Add Your Launch Profile

set up your configurations based on your project

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文