仅在解决方案中的调试配置中构建项目 [英] Build Project in only Debug Configuration in a Solution
问题描述
我有一个 VS2012 解决方案,它有 10 个项目.该解决方案是由所有配置的脚本构建的.仅当解决方案内置(调试,发布内部)配置时,我才希望构建十个项目中的一个.我如何在 VS2012 中做到这一点?
I have a VS2012 solution which has 10 projects.The solution is build by a script for all configurations. There is one project out of the ten that I want only to be build only if the solution is built in (debug,release Internal) configuration. How can I do it in VS2012?
更新 1:如果我们有一个解决方案,其中包含一个仅配置为调试模式的项目.如果我们在发布模式下构建解决方案,则项目会在调试模式下构建.关键是,如果解决方案当前不在 debug/release_internal 下构建,我根本不希望它构建.
Update 1: If we have a solution which has a project which is configured only for debug mode. If we built the solution in release mode, the project builds in debug mode. The point is, I don't want it to build at all if the solution is not currently build under debug/release_internal.
推荐答案
您可以使用配置管理器进行设置(可通过活动解决方案配置下拉列表中的最后一项访问):
You can set this up using the configuration manager (accessible via the last item in the active solution configuration dropdown):
然后只需取消选中您不想在给定解决方案配置/平台中构建的所有项目的相关构建"复选框(不要忘记为每个适用的组合执行此操作解决方案配置/平台):
Then simply uncheck the relevant "Build" checkbox for all the projects you don't want to build in the given solution configuration/platform (don't forget to do this for each applicable combination of solution configurations/platforms):
这篇关于仅在解决方案中的调试配置中构建项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!