Using Web Deploy on a Windows 2012 Server, if a deployment has a folder full of user generated content I exclude it from publishing in the .pubxml
file with:
<ExcludeFoldersFromDeployment>somefoldername</ExcludeFoldersFromDeployment>
If you use the Remove additional files at destination option for deploying, files in this folder are still removed from the live server.
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
Is there any way to make the deployment process, including the clean-up of the live server, ignore a specified folder? I like knowing the publish process also removes deleted or modified files from the server, but wiping out entire folders of user generated data is obviously a problem!