5

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 Answer 1

6

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
Sign up to request clarification or add additional context in comments.

2 Comments

That works for that project, but I can do that in the project properties. The problem is the (binary) referenced libraries that have XML documentation.
I see. Added msdeploy example of skipping all xml files. You can append -whatif flag to the command the get a preview.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.