[英]How to build and run multiple projects in Visual Studio
There are many, many projects in the VS solution my company has. 我公司的VS解决方案中有很多项目。 Thing is, I need to build and run these 4 different C# projects of that solution:
A
, B
, C
and D
, in that order. 问题是,我需要按该顺序构建和运行该解决方案的这4个不同的C#项目:
A
, B
, C
和D
How do I achieve that without buildrunning each separately. 如何在不分别运行的情况下实现这一目标。
I hope I'm not asking a duplicate question, but I'm really not sure what terms should I use to search for an already answered duplicate. 我希望我不要问一个重复的问题,但是我真的不确定我应该使用什么术语来搜索已经回答的重复项。
Building/Running your projects as a group is easy, but building them in your own order is not. 以组的形式构建/运行项目很容易,但是以您自己的顺序构建它们却不是。 Remember that dependencies determine the order in which projects are built.
请记住,依赖关系决定了项目的生成顺序。
To build them as a group, simply place them all in the same Solution folder and invoke build on them: 要将它们作为一个组构建,只需将它们全部放在同一个Solution文件夹中并在其上调用build:
To run them as a group, you have a few choices: 要将它们作为一个组运行,您有几种选择:
When you run a project, VS will automatically do any and all building necessary to run your startup project. 当您运行一个项目时,VS将自动执行运行启动项目所需的任何和所有构建。 It will also determine this order for you based on the dependency tree.
它还将根据依赖关系树为您确定此顺序。 You shouldn't need to edit this under most circumstances.
在大多数情况下,您无需进行编辑。 VS lets you do so by editing the dependencies.
VS使您可以通过编辑依赖项来实现。 Right click on your project and select
Build Dependencies
> Project Build Order
to see the current build order and edit your dependencies, which will affect the build order. 右键单击您的项目,然后选择“
Build Dependencies
>“ Project Build Order
以查看当前的构建顺序并编辑您的依赖关系,这将影响构建顺序。
While debugging, you can right click on another project you want to run and select Debug > Start New Instance to run that project in addition to your startup project. 调试时,除了启动项目之外,您还可以右键单击要运行的另一个项目,然后选择“调试”>“启动新实例”以运行该项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.