Skip to content

Commit de9126a

Browse files
authored
Merge pull request #177021 from anthonychu/patch-3
[Azure Functions] Add language specific upgrade instructions
2 parents f973bb8 + 78a72b1 commit de9126a

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

articles/azure-functions/functions-versions.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,60 @@ Any function app pinned to `~2.0` continues to run on .NET Core 2.2, which no lo
6969

7070
Azure Functions version 4.x (Preview) is highly backwards compatible to version 3.x. Many apps should safely upgrade to 4.x without significant code changes. Be sure to test extensively before changing the major version in production apps.
7171

72+
### Upgrading an existing app
73+
74+
#### Local project
75+
76+
# [C\#](#tab/csharp)
77+
78+
To update a .NET app to .NET 6 and Azure Functions 4.x, update the `TargetFramework` and `AzureFunctionsVersion`:
79+
80+
```xml
81+
<TargetFramework>net6.0</TargetFramework>
82+
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
83+
```
84+
85+
Also, ensure the NuGet packages references by your app are updated to the latest versions. See [breaking changes](#breaking-changes-between-3x-and-4x) for more information.
86+
87+
##### .NET 6 in-process
88+
89+
* [Microsoft.NET.Sdk.Functions](https://www.nuget.org/packages/Microsoft.NET.Sdk.Functions/) 4.0.0 or later
90+
91+
##### .NET 6 isolated
92+
93+
* [Microsoft.Azure.Functions.Worker](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker/) 1.5.2 or later
94+
* [Microsoft.Azure.Functions.Worker.Sdk](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk/) 1.2.0 or later
95+
96+
# [Java](#tab/java)
97+
98+
To update your Java app to Azure Functions 4.x, update your local installation of [Azure Functions Core Tools](functions-run-local.md#install-the-azure-functions-core-tools) to 4.x and update your app's [Azure Functions extensions bundle](functions-bindings-register.md#extension-bundles) to 2.x or above. See [breaking changes](#breaking-changes-between-3x-and-4x) for more information.
99+
100+
# [JavaScript](#tab/javascript)
101+
102+
To update your Node.js app to Azure Functions 4.x, update your local installation of [Azure Functions Core Tools](functions-run-local.md#install-the-azure-functions-core-tools) to 4.x and update your app's [Azure Functions extensions bundle](functions-bindings-register.md#extension-bundles) to 2.x or above. See [breaking changes](#breaking-changes-between-3x-and-4x) for more information.
103+
104+
> [!NOTE]
105+
> Node.js 10 and 12 are not supported in Azure Functions 4.x.
106+
107+
# [PowerShell](#tab/powershell)
108+
109+
To update your PowerShell app to Azure Functions 4.x, update your local installation of [Azure Functions Core Tools](functions-run-local.md#install-the-azure-functions-core-tools) to 4.x and update your app's [Azure Functions extensions bundle](functions-bindings-register.md#extension-bundles) to 2.x or above. See [breaking changes](#breaking-changes-between-3x-and-4x) for more information.
110+
111+
> [!NOTE]
112+
> PowerShell 6 is not supported in Azure Functions 4.x.
113+
114+
# [Python](#tab/python)
115+
116+
To update your Python app to Azure Functions 4.x, update your local installation of [Azure Functions Core Tools](functions-run-local.md#install-the-azure-functions-core-tools) to 4.x and update your app's [Azure Functions extensions bundle](functions-bindings-register.md#extension-bundles) to 2.x or above. See [breaking changes](#breaking-changes-between-3x-and-4x) for more information.
117+
118+
> [!NOTE]
119+
> Python is not supported in Azure Functions 4.x.
120+
121+
---
122+
123+
124+
#### Azure
125+
72126
To migrate an app from 3.x to 4.x, set the `FUNCTIONS_EXTENSION_VERSION` application setting to `~4` with the following Azure CLI command:
73127

74128
```bash
@@ -105,6 +159,8 @@ The following are some changes to be aware of before upgrading a 3.x app to 4.x.
105159

106160
# [C\#](#tab/csharp)
107161

162+
- Azure Functions 4.x supports .NET 6 in-process and isolated apps.
163+
108164
- `InvalidHostServicesException` is now a fatal error. ([#2045](https://github.com/Azure/Azure-Functions/issues/2045))
109165

110166
- `EnableEnhancedScopes` is enabled by default. ([#1954](https://github.com/Azure/Azure-Functions/issues/1954))
@@ -119,10 +175,20 @@ The following are some changes to be aware of before upgrading a 3.x app to 4.x.
119175

120176
# [JavaScript](#tab/javascript)
121177

178+
- Node.js 10 and 12 are not supported in Azure Functions 4.x. ([#1999](https://github.com/Azure/Azure-Functions/issues/1999))
179+
122180
- Output serialization in Node.js apps was updated to address previous inconsistencies. ([#2007](https://github.com/Azure/Azure-Functions/issues/2007))
123181

182+
# [PowerShell](#tab/powershell)
183+
184+
- PowerShell 6 is not supported in Azure Functions 4.x. ([#1999](https://github.com/Azure/Azure-Functions/issues/1999))
185+
186+
- Default thread count has been updated. Functions that are not thread-safe or have high memory usage may be impacted. ([#1962](https://github.com/Azure/Azure-Functions/issues/1962))
187+
124188
# [Python](#tab/python)
125189

190+
- Python 3.6 is not supported in Azure Functions 4.x. ([#1999](https://github.com/Azure/Azure-Functions/issues/1999))
191+
126192
- Shared memory transfer is enabled by default. ([#1973](https://github.com/Azure/Azure-Functions/issues/1973))
127193

128194
- Default thread count has been updated. Functions that are not thread-safe or have high memory usage may be impacted. ([#1962](https://github.com/Azure/Azure-Functions/issues/1962))
@@ -164,6 +230,10 @@ None.
164230

165231
* Node.js 8 is no longer supported and will not execute in 3.x functions.
166232

233+
# [PowerShell](#tab/powershell)
234+
235+
None.
236+
167237
# [Python](#tab/python)
168238

169239
None.

0 commit comments

Comments
 (0)