2

I have created a new Function App with an App Service Plan. It is based on Linux with .NET6 see here.

After the creation, the Function runtime version is 4 and on the General settings page the Stack and the .NET version is correct (.NET 6). Function Runtime version, NET version

When connect (Advanced Tools/Bash) to the app to check the version of the .Net using the "dotnet --version" command, I'm getting back .NET version 3.141.5. Azure app service plan bash.

Why am I getting the .Net3.1 instead of .Net6 as selected in the configuration?

Also I have created a similar setup based on Windows OS+.Net6 and with this configuration I get .Net6.

1 Answers1

0

Function V4 required .net 6 version.

enter image description here

Click on Download a template for automation. enter image description here

enter image description here

enter image description here

Its run runtime version is 4.8.0 and click on JSON view link. enter image description here

Here is show .Net version 6. enter image description here

More information read this documents by demiliani

  • Thank you for your reply! From the Azure Portal we created two new Azure Functions (completely new, meaning that we did not deploy any of our code to it), both had .Net6 selected from the portal dropdowns. Out of the box the Windows-based system correctly displays .Net6 via CMD tool, BUT the Linux system defaults to 3.1 via Bash tool. What are your suggestions on this? Why returns the Advenced tools -> Bash -> "dotnet --version .Net 3.1 instead of Net 6 on the Linux sytem ? – Balazs Terza Aug 10 '22 at 14:43
  • dotnet --version is not the cmdlet for checking the function runtime stack version. https://learn.microsoft.com/en-us/cli/azure/functionapp/config/appsettings?view=azure-cli-latest#az-functionapp-config-appsettings-list , When we run this cmdlet, we get the dotnet version used in that Function App – PunitSharma Sep 02 '22 at 09:29