如何从MSBuild中排除XML文档文件 [英] How to exclude xml doc files from msbuild

查看:83
本文介绍了如何从MSBuild中排除XML文档文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#项目中使用了许多第三方程序集.他们中的许多文件都包含xml文档文件,我相信这些文件会给我带来智能吗?无论如何,当我构建项目时,这些xml文件最终都位于bin文件夹中.有什么方法可以排除它们,以便它们不会随我的应用程序一起部署(除了从我引用该程序集的位置中将它们删除)?

I used a number of third party assemblies in my C# projects. Many of them include xml document files that I believe give me intellisense? Anyway, when I build my projects those xml files end up in the bin folder. Is there any way to exclude them so that they do not get deployed with my app (beside removing them from the location I reference the assembly in)?

这个问题一直困扰着我,但从来没有解决过.现在,我的部署文件夹中似乎有4MB的XML文件,这让我很烦恼,无法寻求解决方案.

This problem has always bugged me but never enough to pursue. Now I seem to have 4MB worth of XML files in my deployment folder and it bothering me enough to seek a solution.

推荐答案

您还可以通过命令行指定此名称:

You can also specify this via the command line:

MsBuild.exe build.file /p:AllowedReferenceRelatedFileExtensions=none

这篇关于如何从MSBuild中排除XML文档文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆