Problem
After upgrading a .Net Core 2.2 Linux Web App to .Net Core 3.1 in Azure, the application is down with a Specified framework 'Microsoft.AspNetCore.App', version '3.1.0' was not found
error. I even went as far to create a new Linux Web App with .Net Core 3.1, and after the bash command prompt is still outputting dotnet --list-runtimes
as 2.2.7
.
Details
Website Down
Logstream
reporting application is down because it can't find .net core 3.1.
Created new .net core web app
3.1 linux webapp in North Central, same problem
Ensured it was running in North Central US
According to https://aspnetcoreon.azurewebsites.net/, should have full .netCore 3.1 support
opt/dotnet/runtimes
lists 3, 3.0 and 3.0.0, but no 3.1`
Environment variables
My environment variables in Azure list FRAMEWORK_VERSION = lts
, instead of 3.1
Publishing
This was published from an azure devops ci pipeline using an Azure AppService Deploy task. 3.1 wasn't available here, so I chose LTS
Update 1
It seems the culprit is 3.1 missing from the framework stack in Azure Devops Web App / Web Service tasks.
Whenever I publish from CI, the web app framework is updated to whatever is selected in this dropdown. If I manually go change the framework to 3.1 on the Azure Web App, the site comes up. But then the next publish it goes back down because it reverts the framework back to the settings in the ci.
New Question
How can I get the Azure Devops Release pipeline to publish a .net core 3.1 task?
Update 2
Related Azure Devops forum post
Currently being investigated as of 2/23/2020
.Net Core 3.1 deploy pipeline to Linux App Service
Suggested Workarounds
- Use YML for release pipeline and manually change the version from
3.0
to3.1
, noted by answer and this thread - Upgrade from a
framework dependent
release to aself contained
. Reference - Downgrade to .NetCore 3.0