简体   繁体   English

如何在不依赖Visual Studio C#的生成中包含项目

[英]How to include a project in a build that is not a dependency in Visual Studio c#

I have two projects in my solution, A and B. A is the start-up project. 我的解决方案中有两个项目,A和B。A是启动项目。 B references A. B参考A。

After making changes to both A and B when I start the solution A gets built, but not B. This makes sense since A does not reference B and A is the start-up project. 在我启动时对A和B都进行更改之后,构建了解决方案A,但没有构建B。这是有道理的,因为A没有引用B,并且A是启动项目。

I would like both to build every time I start the solution. 每次启动解决方案时,我都希望两者都构建。 Currently I get round this problem by manually building B before running the solution. 目前,我通过在运行解决方案之前手动构建B来解决此问题。

How can this be achieved? 如何做到这一点?

I think you can configure which projects can be built by changing the configuration available under the solution properties. 我认为您可以通过更改解决方案属性下可用的配置来配置可以构建哪些项目。 Select "Solution" node and on right click, go to properties and try this. 选择“解决方案”节点,然后右键单击,转到属性并尝试此操作。 See if this works. 看看是否可行。 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Visual Studio、C# 项目的部署中包含文件和文件夹? - How to include files and folders in the deployment of a visual studio, C# project? 如何使用 C# 在 Visual Studio 上构建我的项目的 exe - how to build exe of my project on visual studio using c# C#-Visual Studio项目构建 - C# - Visual Studio project build 无法在Visual Studio中构建C#项目 - Cannot build C# project in Visual Studio 从C#Visual Studio Project包含并启动PDF - Include and launch PDF from C# Visual Studio Project 在Visual Studio C#项目中包含Oracle.DataAccess.dll - Include Oracle.DataAccess.dll in Visual Studio C# Project 如何自动将生成的源文件包含到Visual Studio中的C#项目中? - How to automatically include generated source files into a C# project in Visual Studio? 无法在 Visual Studio Code 中构建 Q#/C# 项目 - Not able to build Q#/C# project in Visual Studio Code 如何在项目中使用不同的文件以用于不同的构建配置 - Visual Studio C#.net - How to use different files in a project for different build configurations - Visual Studio C# .net 如何从C#项目的构建事件中访问Visual Studio解决方案级平台? - How can you access the Visual Studio solution level platform from a C# project's build event?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM