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?
I have created .NET Core 7 App
and deployed to Azure App Service. Even I got the same error.
In Azure Portal
=> App Service
=> Configuration => General Settings
, .NET Version
is shown as .NET 6(LTS)
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
.
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.
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
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
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.
Now Iam able to access the App without any issues.