Am I running .NET 8 or .NET 6 in my Azure App Service

Richard Tolley 0 Reputation points
2024-12-18T23:37:04.1+00:00

Hi

I have just upgraded one of our APIs from .NET 6 to .NET 8.

Everything runs, everything looks good, but I had a few issues to start with.

Now, to verify a few things, I used Kudu to confirm the .NET version was correct.

When using SSH and running dotnet --list-runtime-versions I see the expected

root@03d47a33f421:~/site/wwwroot# dotnet --list-runtimes

Microsoft.AspNetCore.App 8.0.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]

Microsoft.NETCore.App 8.0.7 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

When using Bash and running the same dotnet --list-runtime-versions I see .NET 6

root@03d47a33f421:~/site/wwwroot# dotnet --list-runtimes

Microsoft.AspNetCore.App 8.0.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]

Microsoft.NETCore.App 8.0.7 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

So the question...

Which runtime version am I actually using?

Is my API successfully upgraded and running .NET 8?

Kind regards

Rich

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,187 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,195 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Divyesh Govaerdhanan 640 Reputation points
    2024-12-22T22:16:05.5566667+00:00

    Please check the App Service's .Net Version in Settings --> Configuration --> General Settings --> .Net Version. Ensure .Net 8 is selected as the configuration if not please select .Net 8 here.

    Also Enable Application logging and see the application logs to confirm the runtime version of the app.

    0 comments No comments

  2. Bruce (SqlWork.com) 69,806 Reputation points
    2025-01-01T18:05:08.1933333+00:00

    As the runtimes install side by side, it’s the apps target runtime at build that determines the version of .net runtime required. If you deployed a .net 8 app, it would not run if .net 8 was not installed, unless you also included runtime in the deployment. Alternatively if you deployed a .net 6 app, it still requires .net 6 runtime and will not use .net 8 runtime if installed.

    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.