如何从 MSBuild 的构建中排除项目? [英] How can I exclude a project from a build in MSBuild?
本文介绍了如何从 MSBuild 的构建中排除项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要构建一个解决方案,但排除一个项目.我该怎么做?
I need to build a solution, but exclude one project. How should I do it?
我搜索了很多关于这个问题的信息,但没有任何帮助.
I searched a lot about this issue, but nothing could help.
ItemGroup 部分引发以下异常:
无效元素.未知的任务或数据类型.
Invalid element . Unknown task or datatype.
PropertyGroup 也引发异常.
以下是我的代码示例:
<project name="TI 8.1.6 build script">
<ItemGroup>
<Solution Include="${ROOT}\Core\TI Core.sln" Exclude="${ROOT}\Utilities\DTS Indexing Service\Tdi.Origami.IndexUpdaterServiceSetup\Tdi.Origami.IndexUpdaterServiceSetup.wixproj"/>
</ItemGroup>
...
</project>
我该怎么做?
推荐答案
您可以在解决方案级别排除特定的项目 构建配置 使用 Visual Studio 中的配置管理器对话框:
You can exclude projects at the solution level for a specific build configuration by using the Configuration Manager Dialog in Visual Studio:
然后您可以简单地调用解决方案文件上的msbuild
,指定要使用的构建配置:
Then you can simply invoke msbuild
on the solution file specifying the build configuration to use:
msbuild /property:Configuration=Release MySolution.sln
这篇关于如何从 MSBuild 的构建中排除项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文