Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Skip XML documentation files with Web Deploy

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.

like image 640
TrueWill Avatar asked Mar 23 '12 16:03

TrueWill


1 Answers

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
like image 81
KMoraz Avatar answered Oct 01 '22 06:10

KMoraz