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

1

13

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."

Swath answered 4/10, 2011 at 13:25 Comment(3)
This #3321764 totally did what we needed.Swath
You should answer your own question to help others :)Aorta
This other answer may help you too: https://mcmap.net/q/484280/-how-do-i-get-msdeploy-to-create-app_data-if-it-doesn-39-t-exist-but-not-delete-any-contents-of-the-remote-directorySincerity
T
16

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.

Terrier answered 16/3, 2012 at 3:49 Comment(2)
How can i DoNotDelete a specific folder in the root of the app? skip is not working for meTile
What are providers?Ondine

© 2022 - 2024 — McMap. All rights reserved.