如何从 MSBuild 的构建中排除项目?

编程入门 行业动态 更新时间:2024-10-24 01:52:37
本文介绍了如何从 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 的构建中排除项目?

本文发布于:2023-11-16 17:00:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1606165.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:项目   MSBuild

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!