Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specified framework 'Microsoft.AspNetCore.App', version '3.1.0' was not found for a Linux Azure WebApp

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

Application Error

Logstream

reporting application is down because it can't find .net core 3.1.

Logstream

Created new .net core web app

3.1 linux webapp in North Central, same problem

Created new web app

Ensured it was running in North Central US

According to https://aspnetcoreon.azurewebsites.net/, should have full .netCore 3.1 support

Still .net core 2.2.7 cmd prompt 2.2.7

opt/dotnet/runtimes lists 3, 3.0 and 3.0.0, but no 3.1` enter image description here

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

Devops release pipeline

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

  1. Use YML for release pipeline and manually change the version from 3.0 to 3.1, noted by answer and this thread
  2. Upgrade from a framework dependent release to a self contained. Reference
  3. Downgrade to .NetCore 3.0
like image 285
w00ngy Avatar asked Jan 21 '20 13:01

w00ngy


2 Answers

I've run into the same situation, using the information you provided I've been able to fix the issue by setting the value manually in the Devops Pipelines Build .yml file. It seems like they are just missing the value from RunTime Stack drop down. If you manually update the build processes .yml file as seen here:

enter image description here

This will select the proper framework version. Hopefully this will fix your issue with the Azure Devops CI Pipeline deployment.

like image 164
Taran Beekhuis Avatar answered Sep 26 '22 02:09

Taran Beekhuis


An easier solution is to type DOTNETCORE|3.1 into the Runtime Stack dropdown in devops. (Thanks rdavisau!)

enter image description here

like image 26
w00ngy Avatar answered Sep 22 '22 02:09

w00ngy