Is there a way to install the missing dotnet 2.2 framework on an Azure Web Service? Site is down, upgrade is a major undertaking

Mark McTernan 6 Reputation points
2020-06-29T17:53:07.857+00:00

This is an Azure App Service dependency issue related to the removal of dotnet 2.2 from the Azure App Service images. I am attempting to ask if there is a way to temporarily restore 2.2 so as to get my App Service api back up and running while I work on the port to 3.1

A few days ago I noticed that Azure Dev Pipelines could no longer execute xunit tests during CI/CD because dotnet 2.2 had been removed from the build agent images, so I reached out and I was able to add a step spelled out here:

https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/dotnet-core-tool-installer?view=azure-devops

which details how to install the framework on the build agent prior to running the pipeline's tests, which solved that problem...

BUT,

A related issue appeared on the target App Service (linux), since the api (also written in dotnet 2.2) could no longer run because the App Service was also missing 2.2

Fortunately I didn't attempt to run our "prod" deployment CI/CD, (too late for the "staging" environment), and it continued to running fine... (just as it has for the last several months) ...until yesterday.

Now both api app services are throwing 500 errors because it can't find the framework and our production site is down.

An upgrade to dotnet 3.1 is a major undertaking for us and we need to get the prod api up in the meantime. Is there a way to do this either on the app service or to deploy 2.2 to the target app service container via a pipeline?

This is a major problem for us and we are quite perturbed that a running App Service wouldn't just be left alone until we actually deployed something to it.

Thank you for any help you can provide.

Here is the log revealing the issue that the framework is missing:

2020-06-29T17:07:31.862401468Z _____
2020-06-29T17:07:31.862444269Z / _ \ __________ _________ ____
2020-06-29T17:07:31.862455269Z / /\ ___ / | _ __ _/ __ \
2020-06-29T17:07:31.862464069Z / | / /| | /| | /\ /
2020-06-29T17:07:31.862472469Z _
|__ /_____ _
/ || ___ >
2020-06-29T17:07:31.862481169Z / / /
2020-06-29T17:07:31.862489370Z A P P S E R V I C E O N L I N U X
2020-06-29T17:07:31.862497370Z
2020-06-29T17:07:31.862504870Z Documentation: http://aka.ms/webapp-linux
2020-06-29T17:07:31.862512670Z Dotnet quickstart: https://aka.ms/dotnet-qs
2020-06-29T17:07:31.862520270Z ASP .NETCore Version: 2.1.18
2020-06-29T17:07:31.862527770Z Note: Any data outside '/home' is not persisted
2020-06-29T17:07:31.938111952Z Running oryx create-script -appPath /home/site/wwwroot -output /opt/startup/startup.sh -defaultAppFilePath /defaulthome/hostingstart/hostingstart.dll -bindPort 8080 -userStartupCommand ''
2020-06-29T17:07:31.966068816Z Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
2020-06-29T17:07:31.966407720Z Could not find operation ID in manifest. Generating an operation id...
2020-06-29T17:07:31.967237231Z Build Operation ID: ----------------------------------
2020-06-29T17:07:33.286155074Z Writing output script to '/opt/startup/startup.sh'
2020-06-29T17:07:33.920479619Z Trying to find the startup DLL name...
2020-06-29T17:07:33.920671421Z Found the startup D name: wbwbwb.Api.dll
2020-06-29T17:07:33.920832124Z Running the command: dotnet "wbwbwb.Api.dll"
2020-06-29T17:07:33.957845105Z It was not possible to find any compatible framework version
2020-06-29T17:07:33.958022307Z The specified framework 'Microsoft.AspNetCore.App', version '2.2.0' was not found.

2020-06-29T17:07:33.958057407Z - Check application dependencies and target a framework version installed at:
2020-06-29T17:07:33.958068308Z /usr/share/dotnet/
2020-06-29T17:07:33.958076608Z - Installing .NET Core prerequisites might help resolve this problem:
2020-06-29T17:07:33.958085308Z https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
2020-06-29T17:07:33.958094208Z - The .NET Core framework and SDK can be installed from:
2020-06-29T17:07:33.958102408Z https://aka.ms/dotnet-download
2020-06-29T17:07:33.958740016Z - The following versions are installed:
2020-06-29T17:07:33.958758816Z 2.1.18 at [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
2020-06-29T17:07:33.338Z INFO - Initiating warmup request to container wbwbwb_0_b46a94fa for site wbwbwb
2020-06-29T17:07:34.583Z ERROR - Container wbwbwb_0_b46a94fa for site wbwbwb has exited, failing site start
2020-06-29T17:07:34.584Z INFO - Initiating warmup request to container wbwbwb_0_b46a94fa_middleware for site wbwbwb
2020-06-29T17:07:38.984Z INFO - Container wbwbwb_0_b46a94fa_middleware for site wbwbwb initialized successfully and is ready to serve requests.
2020-06-29T17:07:38.996Z ERROR - Container wbwbwb_0_b46a94fa didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging.
2020-06-29T17:07:39.780Z INFO - Stopping site wbwbwb because it failed during startup.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,935 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,852 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 25,486 Reputation points Microsoft Employee
    2020-07-01T01:43:14.657+00:00

    Hi @MarkMcTernan-5200,

    I couldn't confirm this with my envrionment (EastUS region deployment) because dotnet --info returns 2.2.7 for me. Let me know which region you're deploying to and I try that one. But, the necessary steps should be deploying your app as self-contained. dotnet publish --self-contained from the command line or the drop down from Visual Studio publish.

    11067-2020-06-30-21-19-57-publish.png

    DotNetCore 2.1 is still an available runtime (`az webapp list-runtimes --linux`) so set your web app settings to net core 2.1 and verify with dotnet --info on https://<app-name>.scm.azurewebsites.net/DebugConsole.

    Since the logs you shared show it's using ASP.NET Core 2.1.18, the --self-contained is all you should need. If it's not, let me know if errors you're still hitting.