1

I have a web site built using .NET 7 RC2, but when trying to deploy it to Azure AppServices, it fails with HTTP error 500.31. When running dotnet --info on my AppService, I get the following list of SDK(s) which do not include RC2.

I need a feature that available on ASP.NET 7. Is there a way to install the version I need?

enter image description here

RashadRivera
  • 793
  • 10
  • 17
  • I have created `.NET Core 7 App` and deployed to Azure App Service. Even I got the same [error](https://i.stack.imgur.com/XmWET.png). – Harshitha Oct 22 '22 at 08:17
  • In `Azure Portal` => `App Service` => Configuration => `General Settings`, `.NET Version` is shown as [.NET 6(LTS)](https://i.stack.imgur.com/EN4Zg.png). This is because .NET 7 is still in preview version. Even after updating the Version to .NET 7 (Preview), In KUDU Console I can see the version as [.NET 7 RC1](https://i.stack.imgur.com/FLwGJ.png). – Harshitha Oct 22 '22 at 08:27

1 Answers1

3

I have created .NET Core 7 App and deployed to Azure App Service. Even I got the same error.

enter image description here

In Azure Portal => App Service => Configuration => General Settings, .NET Version is shown as .NET 6(LTS)

enter image description here

This is because .NET 7 is still in preview version. So by default, it is taken as .NET 6.

Even after updating the Version to .NET 7 (Preview), In KUDU Console I can see the version as .NET 7 RC1. enter image description here

How to install dotNET 7 RC2 in App Service

In Azure App service, we have 2 ways to install versions.

Way1 :

In KUDU Console => Site extensions => Gallery type .NET Core 7 in search box , you will find an option to install extensions.

Click on the + sign to install the required extension.

enter image description here

Path to SCM - https://YourAppName.scm.azurewebsites.net/

Way2:

Navigate to Azure Portal => Your App Service => Under Developer Tools Click on Extensions => Add

Search for asp.net core , you will find runtime versions related to .NET 7 RC2

enter image description here

Select the required extension and click on Accept legal terms and click on OK

After adding the extensions in Azure App Service, In VS i have tried to Publish again, I got the below Warning

enter image description here

It clearly says that,In Azure App Service there is no support for .NET 7 RC2 as of now.

Under Settings => Change the Deployment Mode to Self-contained,Save and Publish the App. enter image description here

Now Iam able to access the App without any issues.

enter image description here

Harshitha
  • 3,784
  • 2
  • 4
  • 9
  • Harshitha, That was exactly what I was missing. Thanks for the detail you included. It is very helpful. – RashadRivera Oct 24 '22 at 17:12
  • Wow man, thanks. way2 worked for me. Why tf would Azure not include .Net Core 7 runtime if is selected that stack under the App Services configuration? it doesnt make sense. – ajzbrun May 05 '23 at 12:46