本文介绍了如何从 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}CoreTI Core.sln" Exclude="${ROOT}UtilitiesDTS Indexing ServiceTdi.Origami.IndexUpdaterServiceSetupTdi.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 中的构建中排除项目?
发布评论