2

I'm trying to find out how can I preserve some folders using Azure DevOps. I already got to deploy but this website has some folders with uploaded content that I can't override.

Can someone give me a hint?

Thanks a lot!

huysmania
  • 1,054
  • 5
  • 11

1 Answers1

0

If your project is .net core 3.1, you can refer to this official document.

You can exclude file by the following element excludes all files from the wwwroot\content folder. You can use it to keep your files not being changed when depoly.

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

You can also refer to other methods in the official documentation to operate on the files or folders in the project when you publish it.

Jason Pan
  • 15,263
  • 1
  • 14
  • 29