Azure web app with .NET Core 3.0 fails: Can't find Microsoft.AspNetCore.App

Viewed 6619

We are trying to deploy our web app after upgrading to .NET Core 3.0, but it keeps getting the "service unavailable" message. If we try to run dotnet from Kudu (dotnet webapp.dll) we get the following error:

It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '3.0.0' was not found.
  - The following frameworks were found:
      2.1.10 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
      2.1.12 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
      2.1.13 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
      2.2.5 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
      2.2.6 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
      2.2.7 at [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The .NET Core frameworks can be found at:
  - https://aka.ms/dotnet-download

We tried to install .NET Core 3.0 with Microsoft's guide for Azure, but with no success.

Any suggestions?

7 Answers

We had exactly the same problem. Azure App Service does not currently support Net Core 3.

The temporary workaround is to build a self contained app from Visual Studio through the publish tool. You can change it from Framework Dependent to Self Contained in the publishing settings. Simply deploy that to Azure.

We also tried to use our DevOps pipelines to do this, but couldn't work out how to do a self contained build and as Azure will hopefully support Net Core 3 soon, the publish works fine for now.

Hope that helps :)

You can add .net core 3.0 x86/ 64 framework using Azure app service extension (open app service -> extensions). Then publish .net core 3.0 app.

My problem was related to an incorrect web.config. When changing to self-contained application you have to modify the aspNetCore-part of your web.config.

New web.config

<aspNetCore processPath=".\[your].exe"
stdoutLogEnabled="false"
stdoutLogFile=".\logs\stdout"/>

Old web.config

<aspNetCore processPath="dotnet" 
arguments=".\[your].dll" 
stdoutLogEnabled="false" 
stdoutLogFile=".\logs\stdout" />

I tried deploying .net core 3.1 blazor server app to app service linux and it failed with same error. So I deployed it to windows .net core 3.0 web app and it worked as self-contained and framework-dependent (windows x86) deployment. Apparently .net core 3.1 runtime is also installed on these servers. But haven't checked.

Related