Why is only .NET 6 installed on Azure App Service Linux with .NET 8 configured

Hilmar Bunjes 5 Reputation points
2024-11-15T18:33:22.9166667+00:00

I have created a new Azure App Service. Operating System is Linux, Runtime Stack is "Dotnetcore - 8.0". The Stack Settings are:

  • Stack: .NET
  • Major version: .NET 8 (LTS)
  • Minor version: .NET 8 (LTS)

My expectation is, that .NET 8 is available on the machine. However, only the following is there:

kudu_ssh_user@...__kudu_...:/$ dotnet --info

global.json file:
  Not found

Host:
  Version:      6.0.33
  Architecture: x64
  Commit:       6c636980f7

.NET SDKs installed:
  No SDKs were found.

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.33 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.33 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Download .NET:
  https://aka.ms/dotnet-download

Learn about .NET Runtimes and SDKs:
  https://aka.ms/dotnet/runtimes-sdk-info



kudu_ssh_user@...__kudu_...:/$ dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.33 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.33 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

The support agent tells me that this might be because .NET 8 (LTS) is in early release. I cannot believe that this is the case as .NET 9 is already available to choose for the App Service.

How can I do the settings to get .NET 8 instead of .NET 6 on the App Service?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,980 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,024 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 16,686 Reputation points Microsoft Employee
    2024-11-15T23:36:39.2633333+00:00

    @Hilmar Bunjes I prefer and recommend using KUDU to verify the runtimes available and installed on your App Service. Can you please follow the below steps to locate the versions installed? (Also you are correct that 8 is LTS and was rolled out last year in GA. See here for source.)

    1. Access Kudu Site:
      • Navigate to the Azure portal.
      • Go to your App Service.
      • In the left-hand navigation, select "Advanced Tools" and then click on the "Go" button. This will open the Kudu site in a new tab.
    2. Access Environment Information:
      • Once you're in the Kudu site, click on the "Environment" tab at the top.
      • This page will display a wealth of information about the environment your app is running in, including the installed runtimes.
    3. Check Installed Runtimes:
      • Scroll through the environment variables and settings to find details about installed runtimes. Look for sections like PATH, LD_LIBRARY_PATH, or specific environment variables related to runtimes (e.g., JAVA_HOME, DOTNET_ROOT, etc.).
      • You can also look under the "App Settings" section for any application settings that might indicate installed runtimes.
    4. Using Console:
      • Alternatively, you can use the Kudu console to check for installed runtimes.
      • Click on the "Debug console" tab and choose either CMD or PowerShell.
      • You can run commands like dotnet --info, java -version, node --version, etc., to check the specific versions of the runtimes installed.

    If you do not see 8 listed as a runtime for your Web App in KUDU, can you please restart your App Service using the restart button in the Portal? Major changes can sometimes require a restart of your app to take effect.

    Lastly, if the above steps do not resolve the issue, try updating and redeploying your application with a specific target framework set to .NET 8 in your project file (.csproj). Ensure your project file includes:

    <PropertyGroup>
      <TargetFramework>net8.0</TargetFramework>
    </PropertyGroup>
    
    
    

    Redeploy your application to the Azure App Service after making this change.

    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.