Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSBuild/WebDeploy - How to prevent it from deleting a folder and its contents

We're using TeamCity to automate MSBuild to use WebDeploy to push our application to our various servers.

For the most part, we've got this working, and great. One snag, though: we've got a folder that holds uploads that we don't want to have deleted during the publication.

How do I tell WebDeploy, "I know that folder's not in the compiled application. Ignore it. Just leave it alone."

like image 270
Rushputin Avatar asked Oct 04 '11 13:10

Rushputin


1 Answers

If you're using the dirPath, filePath, or contentPath providers, you can specify the DoNotDelete rule to block deletions of files on the destination computer that do not exist on the source. The syntax to add to the command line would be -enableRule:DoNotDelete. For more information, see the provider articles mentioned and Web Deploy Rules.

like image 190
timamm Avatar answered Nov 18 '22 09:11

timamm