Error loading hostpolicy.dll while deploying .NET Core console app to Azure WebJobs

后端 未结 3 1744
春和景丽
春和景丽 2021-01-01 23:49

I have followed this tutorial to deploy a .NET Core console application to an Azure Web Service WebJob.

My app is running locally without any issue (with dotnet

3条回答
  •  离开以前
    2021-01-02 00:41

    Alright, I've figured it out.

    If you want to deploy a dotnet core app to Azure Web Service, include the runtime "win7-x86" if you are running your app in 32-Bit platform mode.

    For a Visual Studio 2015 solution, your project.json should include :

      "runtimes": {
        "win10-x64": {},
        "win7-x86": {} //IMPORTANT FOR AZURE DEPLOY
      },
    

    Or if you have already migrated to Visual Studio 2017, your .csproj should include this in PropertyGroup:

    win10-x64;win7-x86
    

    Also, your publish profile should include the same thing:

    
      
        FileSystem
        Release
        netcoreapp1.1
        bin\Release\PublishOutput
        win7-x86 // IMPORTANT
      
    
    

提交回复
热议问题