4

I have a website I'm publishing in Visual Studio. It's publishing using the File System method, and I've selected the option to delete all existing files before publish.

Is there a method that will exclude two specific files from deletion? Both of these files exist in the root of the website folder.

I've tried editing the .pubxml file that is created by Visual Studio to include a "MsDeploySkipRules" option but it never seems to work, no matter what settings I've selected. I've also tried to turn "UsMsDeployExe" on and noticed no difference.

Crag
  • 458
  • 4
  • 14
  • Readers - see this related SO question regarding MsDeploySkipRules: https://stackoverflow.com/a/12577115/943435 – Yogi Feb 25 '19 at 20:04

1 Answers1

0

I am sorry I don't have the exact answer for what you have asked. But there is a work around to achieve what you want. see if this helps

You can include those 2 files into your solution and then set the properties Build Action = content Copy to output Directory = Always This way you will always gets same copies in your publishing directory

Hope this helps! If you find answer helpful please up vote Thanks Mohan!

Mohan
  • 71
  • 4
  • The issue is that I require a unique version of these files for each different website I'm publishing to. The files are already setup for each website, I just want them untouched when I publish. – Crag Dec 16 '15 at 20:11