Web Deployment: How to Store Files in a Specific Destination Folder

Scenario

  • Visual Studio 2012 Web Publishing: Web Deployment Method.
  • "Delete additional files at destination."
  • MVC3 website with download folder

Question

How to save existing files in the download folder without removing the "Delete additional files ..." option from the deployment settings?

+6
source share
1 answer

Obviously, you can do this using the wpp.targets file. Then skip only the desired folder ...

<ItemGroup> <MsDeploySkipRules Include="SkipErrorLogFolder1"> <SkipAction>Delete</SkipAction> <ObjectName>FolderPath</ObjectName> <AbsolutePath>ErrorLog</AbsolutePath> </MsDeploySkipRules> </ItemGroup> 

Look here, look first:

MSbuild command-line option to skip a directory

+2
source

All Articles