subtlespecter
subtlespecter

Reputation: 91

How do I get .NetCore 3.0+ on my Azure App Service instance?

I have two app services in Azure. One is my dev site and the other is prod. I recently upgraded my code to use .NET Core 3.0 and deployed it to my dev site which worked just fine. What fails is deploying to my prod site.

Deploy is handled using the Kudu build in Deployment Center. Code is pulled from github. Changes to the master branch trigger deploys on prod and changes to the develop branch trigger deploys on dev.

The dev app service plan is an F1:Free running on West US 2 on Windows

The prod app service plan is an S1: 1 running on West US on Windows

The deploy to prod fails with the following error

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET Core Web Application deployment.
D:\Program Files (x86)\dotnet\sdk\2.2.109\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.0.  Either target .NET Core 2.2 or lower, or use a version of the .NET SDK that supports .NET Core 3.0. [D:\home\site\repository\stuc.csproj]
Failed exitCode=1, command=dotnet restore "D:\home\site\repository\stuc.csproj"
An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\85.11214.4277\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

I tried installing the extensions for ASP.NET Core 3.1. List of installed extensions on prod I also tried creating a new app service plan (in which I specifically selected the 3.1 version as the stack) I also compared the versions on the console for each app service prod: Prod dotnet version

dev: Dev dotnet version

Finally, I also tried adding the web.config file suggested by this answer.

EDIT:

I created a new app instance on West US 2 and selected .NET Core 3.1 but I got the same error when I tried to deploy.

EDIT 2:

After failing to get any traction here, I upgraded my dev instance to an S1 with the intent of making it my prod instance. It started to fail the deploy. Looks like it's an issue of the various sized app service plans not being the same and having all the same versions.

Upvotes: 1

Views: 1156

Answers (1)

Manish
Manish

Reputation: 1182

West US doesn't support .net core SDK 3.0

You can keep track on the latest releases on the https://aspnetcoreon.azurewebsites.net/

Upvotes: 3

Related Questions