Skip XML documentation files with Web Deploy

半世苍凉 提交于 2019-12-01 17:26:27

问题


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.

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

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?

Update

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.


回答1:


This will globally disable generation of XML documentation:

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

To skip *.xml files with MSDeploy.exe:

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


来源:https://stackoverflow.com/questions/9842519/skip-xml-documentation-files-with-web-deploy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!