Azure functions publish does not copy all files

Solution 1:

This problem is resolved in Azure Functions (.NET 5.0) but in .NET Core 3.1 use

  <PropertyGroup>                         
           <_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>     
  </PropertyGroup>

in the project file of Azure Functions as a workaround. Please find the details https://github.com/Azure/Azure-Functions/issues/1525