In Azure Functions, support for a language stack is limited to specific versions. As new versions become available, you might want to update your apps to take advantage of their features. Support in Functions can also end for older versions, typically aligned to the community end-of-support timelines. See the Language runtime support policy for details.
To ensure your apps continue to receive support, follow the instructions in this article to update them to the latest available versions. The way that you update your function app depends on:
Before you update the stack configuration for your function app in Azure, complete these tasks:
Verify your functions locallyMake sure that you test and verify your function code locally on the new target version.
Use these steps to update the project on your local computer:
Ensure you installed the target version of the .NET SDK.
If you're targeting a preview version, see Functions guidance for preview .NET versions to ensure that the version is supported. Using .NET previews might require more steps.
Update your references to the latest versions of Microsoft.Azure.Functions.Worker and Microsoft.Azure.Functions.Worker.Sdk.
Update your project's target framework to the new version. For C# projects, you must update the <TargetFramework>
element in the .csproj
file. For more information about your version, see Target frameworks.
Changing your project's target framework might also require changes to parts of your toolchain, outside of project code. For example, in Visual Studio Code, you might need to update the azureFunctions.deploySubpath
extension setting through user settings or your project's .vscode/settings.json
file. Check for any dependencies on the framework version that exist outside of your project code, as part of build steps or a CI/CD pipeline.
Make any updates to your project code that the new .NET version requires. Check the version's release notes for specifics. You can also use the .NET Upgrade Assistant to help update your code in response to changes across major versions.
After you make those changes, rebuild your project and test it to confirm your app runs as expected.
Move to the latest Functions runtimeMake sure that your function app runs on the latest version of the Functions runtime (version 4.x). You can determine the runtime version either in the Azure portal or by using the Azure CLI.
Use these steps to determine your Functions runtime version:
In theâ¯Azure portal, locate and select your function app. On the left menu, select Settings > Configuration.
Select theâ¯Function runtime settingsâ¯tab and check the Runtime version value. Your function app should run on version 4.x of the Functions runtime (~4
).
Use the az functionapp config appsettings list command to check your runtime version:
az functionapp config appsettings list --name "<FUNCTION_APP_NAME>" --resource-group "<RESOURCE_GROUP_NAME>"
The FUNCTIONS_EXTENSION_VERSION
setting sets the runtime version. A value of ~4
means that your function app is already running on the latest minor version of the latest major version (4.x).
If you need to first update your function app to version 4.x, see Migrate apps from Azure Functions version 1.x to version 4.x or â¯Migrate apps from Azure Functions version 3.x to version 4.x. Follow the instructions in those articles rather than just changing the FUNCTIONS_EXTENSION_VERSION
setting.
If you updated your app to run correctly on the new version, publish the app updates before you update the stack configuration for your function app.
Tip
To simplify the update process, minimize downtime for your functions, and provide a potential for rollback, you should publish your updated app to a staging slot. For more information, see Azure Functions deployment slots.
When you publish your updated app to a staging slot, make sure to follow the slot-specific update instructions in the rest of this article. You later swap the updated staging slot into production.
Update the stack configurationThe way that you update the stack configuration depends on whether you're running on Windows or on Linux in Azure.
When you use a staging slot, make sure to target your updates to the correct slot.
Use the following steps to update the Java version:
In theâ¯Azure portal, locate and select your function app. On the left menu, select Settings > Configuration. If you have a staging slot, select the specific slot.
In the General settingsâ¯tab, update Java versionâ¯to the desired version.
Select Save and when notified about a restart select Continue.
Use the following steps to update the .NET version:
In theâ¯Azure portal, locate and select your function app. On the left menu, select Settings > Configuration. If you have a staging slot, select the specific slot.
In the General settingsâ¯tab, update .NET versionâ¯to the desired version.
Select Save and when notified about a restart select Continue.
Use the following steps to update the Node.js version:
In theâ¯Azure portal, locate and select your function app. On the left menu, select Settings > Configuration. If you have a staging slot, select the specific slot.
In the General settingsâ¯tab, update Node.js versionâ¯to the desired version.
Select Save and when notified about a restart select Continue. This change updates the WEBSITE_NODE_DEFAULT_VERSION
application setting.
Use the following steps to update the PowerShell version:
In theâ¯Azure portal, locate and select your function app. On the left menu, select Settings > Configuration. If you have a staging slot, select the specific slot.
In the General settingsâ¯tab, update .NET versionâ¯to the desired version.
Select Save and when notified about a restart select Continue.
Python apps aren't supported on Windows. Select the Linux tab instead.
Use the following steps to update the Java version:
In theâ¯Azure portal, locate and select your function app. On the left menu, select Settings > Configuration. If you have a staging slot, select the specific slot.
In the General settingsâ¯tab, update Java versionâ¯to the desired version.
Select Save and when notified about a restart select Continue.
Use the following steps to update the .NET version:
In theâ¯Azure portal, locate and select your function app. On the left menu, select Settings > Configuration. If you have a staging slot, select the specific slot.
In the General settingsâ¯tab, update .NET versionâ¯to the desired version.
Select Save and when notified about a restart select Continue.
Use the following steps to update the Node.js version:
In theâ¯Azure portal, locate and select your function app. On the left menu, select Settings > Configuration. If you have a staging slot, select the specific slot.
In the General settingsâ¯tab, update Node.js versionâ¯to the desired version.
Select Save and when notified about a restart select Continue. This change updates the WEBSITE_NODE_DEFAULT_VERSION
application setting.
Use the following steps to update the PowerShell version:
In theâ¯Azure portal, locate and select your function app. On the left menu, select Settings > Configuration. If you have a staging slot, select the specific slot.
In the General settingsâ¯tab, update .NET versionâ¯to the desired version.
Select Save and when notified about a restart select Continue.
Python apps aren't supported on Windows. Select the Linux tab instead.
In theâ¯Azure portal, locate and select your function app. On the left menu, select Settings > Configuration. If you have a staging slot, select the specific slot.
In the General settingsâ¯tab, update Python versionâ¯to the desired version.
Note
You can't change the Python version when running in a Consumption plan.
Select Save and when notified about a restart select Continue.
Python apps aren't supported on Windows. Select the Linux tab instead.
Run the az functionapp list-runtimesâ¯command to view the supported version values for your language. Then, run the az functionapp config setâ¯command to update the language version of your function app:
Run the az functionapp list-runtimesâ¯command to view the supported version values for .NET on the isolated worker model:
az functionapp list-runtimes --os "windows" --query "[?runtime == 'java'].{Version:version}" --output table
az functionapp config set --java-version "<VERSION>" --name "<APP_NAME>" --resource-group "<RESOURCE_GROUP>" --slot "staging"
az functionapp list-runtimes --os "windows" --query "[?runtime == 'dotnet-isolated'].{Version:version}" --output table
Run the az functionapp config setâ¯command to update the .NET version of your function app:
az functionapp config set --net-framework-version "v<VERSION>.0" --name "<APP_NAME>" --resource-group "<RESOURCE_GROUP>" --slot "staging"
Use the az functionapp list-runtimesâ¯command to view the supported version values for your language stack (Node.js). Then, run the az functionapp config setâ¯command to update the Node.js version of your function app:
az functionapp list-runtimes --os "windows" --query "[?runtime == 'node'].{Version:version}" --output table
az functionapp config appsettings set --name "<APP_NAME>" --resource-group "<RESOURCE_GROUP>" --settings "WEBSITE_NODE_DEFAULT_VERSION=~<VERSION>" --slot "staging"
az functionapp list-runtimes --os "windows" --query "[?runtime == 'powershell'].{Version:version}" --output table
az functionapp config set --powershell-version "<VERSION>" --name "<APP_NAME>" --resource-group "<RESOURCE_GROUP>" --slot "staging"
In this example, replace <APP_NAME>
and <RESOURCE_GROUP>
with the name of your function app and resource group, respectively. Also replace <VERSION>
with the supported language version to which you're updating. If you aren't using a staging slot, remove the --slot
parameter.
Note
You can't change the Python version when running in a Consumption plan.
Run the az functionapp list-runtimesâ¯command to view the supported linuxFxVersion site setting for your language version:
Run the az functionapp list-runtimesâ¯command to view the supported linuxFxVersion site setting for your language stack version:
az functionapp list-runtimes --os linux --query "[?runtime == 'python'].{Version:version, linuxFxVersion:linux_fx_version}" --output table
az functionapp list-runtimes --os linux --query "[?runtime == 'dotnet-isolated'].{Version:version, linuxFxVersion:linux_fx_version}" --output table
az functionapp list-runtimes --os linux --query "[?runtime == 'node'].{Version:version, linuxFxVersion:linux_fx_version}" --output table
az functionapp list-runtimes --os linux --query "[?runtime == 'python'].{Version:version, linuxFxVersion:linux_fx_version}" --output table
az functionapp list-runtimes --os linux --query "[?runtime == 'powershell'].{Version:version, linuxFxVersion:linux_fx_version}" --output table
Run the az functionapp config setâ¯command to update the site setting for the new language version of your function app:
Run the az functionapp config setâ¯command to update the site setting for the new stack version of your function app:
az functionapp config set --linux-fx-version "<LANGUAGE|VERSION>" --name "<APP_NAME>" --resource-group "<RESOURCE_GROUP>" --slot "staging"
In this example, replace <APP_NAME>
and <RESOURCE_GROUP>
with the name of your function app and resource group, respectively. Also replace <LANGUAGE|VERSION>
with the linuxFxVersion
for your update. If you aren't using a staging slot, remove the --slot
parameter.
Your function app restarts after you update the version.
Swap slotsIf you have been performing your code project deployment and updating settings in a staging slot, swap the staging slot into production. For more information, see Swap slots.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4