Publishing a web application from VS2012 is destroying user content

I am trying to use Web Deploy to publish a web application. I want Visual Studio to delete all files that no longer exist, so I checked the option "Delete additional files at destination" in my publishing profile. However, I want VS to ignore the / Content / uploads folder, as it contains the content that my users uploaded. Naturally, the content on my development site is different from the content on the site. Unfortunately, I could not find a way to force Visual Studio to ignore this folder when publishing (it wants to delete all the content because it does not exist in the project). Does anyone know a way to exclude certain folders on the target site from validation by web deployment?

+4
source share
2 answers

I could not find a suitable solution for this problem, so I created my own: https://pubsync.codeplex.com/

PubSync provides fast and reliable file synchronization for publishing Visual Studio projects.

0
source

I had a similar problem, I want to save some files in the deployment package, even if they are not part of the project.

Try creating a custom MSBuild target for it that works for me.

Here is a link to the MSBuild start page

Hope this helps. All the best.

0
source

Source: https://habr.com/ru/post/1440378/


All Articles