How do I exclude files from my Azure deployment package?

1.4k Views Asked by At

I have some xml documentation files in my bin directory corresponding to referenced dlls. I want to keep the benefits of having the good intellisense while developing, but I'd like to exclude the xml from my deployment package to reduce its file size. Is there a way to prevent that file from being included in the azure cspkg file, but still keep the good intellisense?

1

There are 1 best solutions below

3
On

The simplest way to do this would be to add a Post-Build Event to delete all XML Files from the output directory. This would run before the package file is created.

In your post build event you would want something like....

if $(ConfigurationName) == Release DEL "$(TargetDir)*.xml"

That should get rid of these files before it is packaged up.