跳过使用Web部署XML文档文件 [英] Skip XML documentation files with Web Deploy

查看:192
本文介绍了跳过使用Web部署XML文档文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想发布使用Web部署.NET Web服务。目前,它是包括在包中XML文档文件。我在Visual Studio中的项目属性的编译选项卡选中XML文档文件。这将停止从正在发布的XML文件,但该项目引用一个数字,对XML文档的定制库。

I'm trying to publish a .NET web service using Web Deploy. Currently it's including XML documentation files in the package. I've unchecked "XML documentation file" in the Build tab of the project properties in Visual Studio. This stops that XML file from being published, but the project references a number of custom libraries that have XML documentation.

显然,我们不想关闭文档,我们的自定义库。但也没有理由来部署这些XML文件。

Obviously we don't want to turn off documentation for our custom libraries. There's also no reason to deploy these XML files.

无论是从msdeploy / MSBuild的命令行或从项目属性,我怎么能不被包含在包中,并在随后的网络部署prevent XML文档文件?

From either the msdeploy/msbuild command line or from the project properties, how can I prevent XML documentation files from being included in the package and the subsequent web deployment?

更新

我已经尝试添加 DEL / Q$(TARGETDIR)*。xml的至pre和生成后没有成功的事件。该XML文件仍添加到包。

I've tried adding DEL /Q "$(TargetDir)*.xml" to the Pre- and Post-build events without success. The XML files are still added to the package.

推荐答案

这将在全球范围禁止代的XML文档:

This will globally disable generation of XML documentation:

msbuild some.web.sln /p:DocumentationFile=""

要跳过*与MSDeploy.exe .xml文件:

To skip *.xml files with MSDeploy.exe:

msdeploy -verb:sync -source:contentPath=c:\sourcedir -skip:objectName=filePath,absolutePath=.*.xml -dest:contentPath=c:\newdir

这篇关于跳过使用Web部署XML文档文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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