سؤال

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.

هل كانت مفيدة؟

المحلول

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
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top