0
votes

We have a .NET Core/C# WebAPI that we publish using Visual Studio to an Azure App Service.

When we click publish in Visual Studio then DLLs and PDF documents are copied over to Azure.

The PDF documents are included in the Visual Studio csproj file and have setting "Copy to output directory = Copy if newer". There are many PDF files that never change and the publish is slow because of these files.

How can we either

  1. only publish what has changed
  2. separate publishing the DLLs from publishing the PDFs
1

1 Answers

0
votes

Copying part of the dlls is not possible (or to phrase it better, everything is possible but it is strongly not suggested.).

Neither is possible to publish only the dlls and not the pdfs, becasue what VisualStudio does is that it copies all the publish folder.

In your case I would suggest that you use an Azure Storage solution like Blob or File Share. Place your pdfs on the storage account so they are completely decoupled from your app. Instead of looking at your root folder for the pdfs, you can get them from the Storage.