Web Deploy "Remove additional files at destination" with exception
Asked Answered
L

2

7

I wonder if there is a way to tell Web Deploy not to touch a certain folder during deployment while removing all the other additional files.

Basically I want to leave the "Remove additional files at destination" option on to remove some of the outdated files while preserving all the files within one folder on the server.

The folder contains unknown amount of files generated by the server and I do not want to have to make a copy of those during deployment and copy them back.

I tried using ExcludeFoldersFromDeployment option and it still removes all files in the folder

Lundin answered 3/12, 2017 at 23:23 Comment(3)
Did you ever find a way to accomplish this?Hyphenate
@DaleBurrell unfortunately noLundin
I posted a very similar question a couple of years ago. It’s framed regarding Azure Pipelines, but the answer should address the question here as well. Does this answer your question? Azure Pipelines: Exclude folders using Azure App Service DeployGardiner
G
1

The following element excludes all files from the wwwroot\content folder:

<ItemGroup>
  <MsDeploySkipRules Include="CustomSkipFolder">
    <ObjectName>dirPath</ObjectName>
    <AbsolutePath>wwwroot\\content</AbsolutePath>
  </MsDeploySkipRules>
</ItemGroup>

https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/visual-studio-publish-profiles?view=aspnetcore-7.0#exclude-files

Gunboat answered 21/1, 2023 at 16:29 Comment(0)
C
-2

Try this documentation, you might find it useful MS Document

Copaiba answered 21/5, 2018 at 8:20 Comment(2)
Please don't post link only answers as they become invalid after time. Instead copy the relevant parts out and reference the link.Hyphenate
Further it doesn't actually answer the question.Hyphenate

© 2022 - 2024 — McMap. All rights reserved.