Based on today's announcement of the ASP.NET Core 6 release, it is my understanding that .NET 6 will be immediately available ("day 0 support") on Azure App Services via Early Access:
We are happy to announce that App Service is rolling out day 0 support for .NET 6.0 applications across all public regions and scenarios on both Windows and Linux App Service plans.
After upgrading my ASP.NET Core application to ASP.NET Core 6, configuring my Azure App Service to use .NET 6, and publishing my application to my existing Azure App Service, however, I get an HTTP Error 500.31 with the specific message:
The framework 'Microsoft.NETCore.App', version '6.0.0' (x64) was not found.
Notably, the only .NET 6 runtime it lists as available is RC2 (6.0.0-rc.2.21480.5
), not today's release version.
Upgrade Steps
To facilitate this, I performed the following steps:
- Project file (
csproj
): Updated the<TargetFramework />
to target thenet6.0
- Publishing profile (
pubxml
): Updated the<TargetFramework />
to target thenet6.0
- Project file (
csproj
): Updated allMicrosoft.AspNetCore.*
NuGet packages to 6.0.0 - Azure App Service Configuration: Updated the .NET Version to ".NET 6 (Early Access)"
Error Message
When accessing my Azure App Service site with detailed errors enabled, however, I receive the following error:
HTTP Error 500.31 - ANCM Failed to Find Native Dependencies
Common solutions to this issue:
The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.
Specific error detected by ANCM:
It was not possible to find any compatible framework version The framework 'Microsoft.NETCore.App', version '6.0.0' (x64) was not found. The following frameworks were found: 2.2.14 at [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] 3.0.3 at [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] 3.1.15 at [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] 3.1.18 at [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] 5.0.7 at [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] 5.0.9 at [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] 6.0.0-rc.2.21480.5 at [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] You can resolve the problem by installing the specified framework and/or SDK. The specified framework can be found at: https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&arch=x64&rid=win10-x64
Additional Information
- I've restarted my Azure App Service (obviously!)
- I've waited (more than an hour) for the runtime to be installed via Early Access
- I am publishing my web application using the
Framework-dependent
deployment mode - I do not have any .NET runtimes configured via Azure App Service Extensions
- I do not have
AspNetCoreModule
(V2
) configured (as was required for ASP.NET Core 3) - This Azure App Service Plan is located in the South Central US region
- I am publishing from today’s release of Visual Studio 2022
Mixed Messages
While the Azure App Service update cited above suggests that there will be "day 0 support", the ASP.NET Core 6 announcement is less committed:
At the time of this post, .NET 6 is being actively deployed to the worldwide network of servers and configured to build and run .NET 6 apps… which should conclude by the end of this week
I would assume that the Azure update on GitHub would be the most authoritative source, but perhaps there are problems with the rollout that haven't yet been acknowledged by the Azure team?
Related Topics
I previously posted two questions related to publishing previous early releases of ASP.NET Core web applications to Azure App Services, and have followed the resolutions relevant to those posts, to no avail:
- Error publishing an ASP.NET Core 3.1 site to Azure from Visual Studio 2019
- Deploy ASP.NET Core 5 app to existing Azure App Service?
Question
How can I deploy a release version of an ASP.NET Core 6 app to an Azure App Service using the Early Access program? Is this even ready yet (as per the Azure App Service announcement)? Or do we need to wait until the end of week (as per the ASP.NET Core 6 announcement)?
Ideally, I’d like to take advantage of Early Access without either distributing the runtime with my application (as a self-contained distribution) or installing the runtime via an extension. Obviously, those remain options, but the premise of Early Access is that they shouldn’t be necessary.