I suggest not deleting these files from the Release directory. Instead, create a separate folder (call her Deploy ) for the files you really want to deploy, and create a script fillDeploy.bat that copies the files you need from Release to Deploy . This script can do some additional things for your deployment (for example, put documentation files there, provide another configuration file, etc.). If you want this script to be called every time you build Release, add a postbuild event to your project, like this one:
if $(ConfigurationName)==Release call $(ProjectDir)fillDeploy.bat
Doc brown
source share