VS 2010:根据自定义解决方案配置在依赖库上设置条件构建选项

时间:2013-05-09 09:26:25

标签: visual-studio-2010 configuration msbuild project

我正在使用Visual Studio 2010.假设我在解决方案中有三个项目:

MainProject
DependentA
DependentB

MainProject是我的启动项目,DependentADependentB被引用。构建模式设置为Debug。然后我创建一个自定义解决方案配置Test并选择它。

现在,Visual Studio会自动将DependentADependentB的构建选项设置为Release。

我想要完成的是设置一些条件。例如,如果选择Test配置,则在DependentA模式下构建DependentBDebug。我在这方面很新,但我想我可以在csproj文件中设置一些条件,就像在这个问题中完成一样:

Visual Studio 2010 Compiling with the Debug or Release version of third party library depending on if my project is being compiled Build or Release?

对于某些示例的任何帮助将不胜感激。谢谢!

1 个答案:

答案 0 :(得分:0)

您是否使用Build Configuration Manager为Test解决方案配置选择了所需的项目构建配置?你的问题并不清楚你是否在寻找比这更复杂的东西。