.NET Core 2 Console App Dependencies Issue on Azure

前端 未结 1 360
暖寄归人
暖寄归人 2021-01-23 05:14

Short version of the problem:

I\'m having difficulties including the assemblies my .NET Core Console App depends on.

Initially, the assemblies f

相关标签:
1条回答
  • 2021-01-23 05:51

    Not quite sure of the WebJobs specification, but you should be able to use dotnet publish --self-contained -r win-x64 -c Release to generate executable and its dependencies. Zip them up and you should be able to deploy to Azure.

    There is really no need to modify your csproj like you did.

    Besides, you can use .NET IL Linker to shrink the size of the generated folder.

    Reference

    https://docs.microsoft.com/en-us/dotnet/core/deploying/deploy-with-cli#self-contained-deployment-with-third-party-dependencies

    0 讨论(0)
提交回复
热议问题