I have an existing Azure App Service running on ASP.NET Core 3.x. I have upgraded the application to today\'s release of ASP.NET Core 5. This works fine on my local IIS Expr
It's not entirely clear from the release notes you referenced, but in order to take advantage of the new App Service Early Access feature (announcement), you need to explicitly configure your App Service to use the .NET 5 stack.
To do this via the Azure Portal for an existing App Service, complete the following steps:
Note: Technically, once you do this, you'll have the .NET 5 runtime installed and could switch back to e.g. the .NET Core runtime stack. Doing so, however, would prevent you from gaining early access to subsequent updates to .NET, so I wouldn't recommend it.
This opt-in for the App Service Early Access is far more explicit when configuring a new App Service via the Azure Portal. In that case, when creating an App Service, you'll be prompted to select the Runtime stack, under which .NET 5 is explicitly labeled as .NET 5 (Early Access).
Note: If you already have another App Service configured to use App Service Early Access on the same App Service Plan, then the .NET 5 runtime will already be installed and available. This is because .NET runtimes are shared between App Services on the same App Service Plan.
Even with the Early Access feature, you may still receive the following warning when publishing from Visual Studio 2019 16.8, assuming you have version compatibility checks enabled:
Your application requires the .NET Core 5.0.0 runtime, but Microsoft Azure App Service only supports the following versions: 2.1.20, 2.1.22, 2.2.11, 2.2.14, 3.0.3, 3.1.6, and 3.1.8.
Despite that, once you publish everything should work, even if you're using the Framework-dependent deployment mode.
As a word of warning: The current implementation of the App Services Early Access feature doesn't yet support Application Insights integration. As such, if you're relying on the automatic integration from Azure, instead of custom instrumentation, you may want to wait until the App Service Early Access feature supports Application Insights integration.
Note: I’ve created an issue requesting status updates regarding Application Insights compatibility, but haven’t yet heard back.
As an alternative, you can instead choose to deploy using the Self Contained deployment mode in your publishing profile (*.pubxml
). This was the approach required for new releases of .NET Core on Azure App Services prior to .NET 5, and it continues to be supported today.