'how do i create an azure function app using dotnet-isolation?

I am trying to create an azure function app using .net5 isolation, however the azure portal doesn't have an option for .net 5 only .net3.1 and .net6(preview), and the command line comes back with az functionapp create: 'dotnet-isolated' is not a valid value for '--runtime', while the azure function online docs say dotnet-isolation is a valid variable the command line --help doesn't show it.

I am trying to setup ci/cd says i have to setup the app before it can complete its task, but I am at a loss.

Any thoughts would be appriciated



Solution 1:[1]

turns outmy command line was out of date a simple command line command 'az upgrade' updated it and got it sorted, still no idea why its on an option in the azure portal but oh well.

Solution 2:[2]

Try this command: func init yourfuncname --worker-runtime dotnet-isolated

Solution 3:[3]

Try to set FUNCTIONS_WORKER_RUNTIME to dotnet-isolated in your function configuration:

enter image description here

When you are using azure cli to create your function you can use:

az functionapp config appsettings set -n $(FunctionName) -g $(FunctionResourceGroupName) --settings "FUNCTIONS_WORKER_RUNTIME=dotnet-isolated"

More information to create Azure Function version 4 isolated with azure cli can be found here: azure cli command 'az functionapp create' - App Keys not generated

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 EnenDaveyBoy
Solution 2 Luiz Fernando Corrêa Leite
Solution 3 ping