Azure Function is reverting to .NET 6 after attempting to upgrade to .NET 8

Jonathan M 15 Reputation points
2024-09-17T16:20:31.3033333+00:00

We have upgraded our function from .Net 6 to .Net 8 as well as set the below in the app. We even went as far as to update the FUNCTIONS_EXTENSION_VERSION to ~4. Yet after successful deployment the application reverts back to .Net 6

<TargetFramework>net8.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,858 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CNHume 0 Reputation points
    2025-03-21T21:06:34.81+00:00

    Under Settings > Configuration for my Azure Web App Service, if I change (and then Save) the .NET Version to either .NET 9 (STS), which I would prefer, or to .NET 8 (LTS) and then Publish, having referenced the appropriate net9.0 or net8.0 Target Framework in my solution, the Web App fails to spin up properly.

    The following error is displayed:

    HTTP Error 500.30 - ASP.NET Core app failed to start

    Meanwhile, Azure has reverted the Configuration for my App Service to .NET 6 (LTS) (deprecated).

    Furthermore, I am using the Self-contained Deployment Mode.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.