You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Migrate apps from Azure Functions version 1.x to version 4.x
11
+
# <aname="top"></a>Migrate apps from Azure Functions version 1.x to version 4.x
12
12
13
13
::: zone pivot="programming-language-java"
14
+
14
15
> [!IMPORTANT]
15
16
> Java isn't supported by version 1.x of the Azure Functions runtime. Perhaps you're instead looking to [migrate your Java app from version 3.x to version 4.x](./migrate-version-3-version-4.md). If you're migrating a version 1.x function app, select either C# or JavaScript above.
17
+
16
18
::: zone-end
19
+
17
20
::: zone pivot="programming-language-typescript"
21
+
18
22
> [!IMPORTANT]
19
23
> TypeScript isn't supported by version 1.x of the Azure Functions runtime. Perhaps you're instead looking to [migrate your TypeScript app from version 3.x to version 4.x](./migrate-version-3-version-4.md). If you're migrating a version 1.x function app, select either C# or JavaScript above.
24
+
20
25
::: zone-end
26
+
21
27
::: zone pivot="programming-language-powershell"
28
+
22
29
> [!IMPORTANT]
23
30
> PowerShell isn't supported by version 1.x of the Azure Functions runtime. Perhaps you're instead looking to [migrate your PowerShell app from version 3.x to version 4.x](./migrate-version-3-version-4.md). If you're migrating a version 1.x function app, select either C# or JavaScript above.
31
+
24
32
::: zone-end
33
+
25
34
::: zone pivot="programming-language-python"
35
+
26
36
> [!IMPORTANT]
27
-
> Python isn't supported by version 1.x of the Azure Functions runtime. Perhaps you're instead looking to [migrate your Python app from version 3.x to version 4.x](./migrate-version-3-version-4.md). If you're migrating a version 1.x function app, select either C# or JavaScript above.
37
+
> Python isn't supported by version 1.x of the Azure Functions runtime. Perhaps you're instead looking to [migrate your Python app from version 3.x to version 4.x](./migrate-version-3-version-4.md). If you're migrating a version 1.x function app, select either C# or JavaScript above.
38
+
28
39
::: zone-end
40
+
41
+
::: zone pivot="programming-language-javascript,programming-language-csharp"
42
+
43
+
This article walks you through the process of safely migrating your function app to run on version 4.x of the Functions runtime. Because project upgrade instructions are language dependent, make sure to choose your development language from the selector at the [top of the article](#top).
44
+
45
+
::: zone-end
46
+
29
47
::: zone pivot="programming-language-csharp"
30
-
If you're running on version 1.x of the Azure Functions runtime, it's likely because your C# app requires .NET Framework 2.1. Version 4.x of the runtime now lets you run .NET Framework 4.8 apps. At this point, you should consider migrating your version 1.x function apps to run on version 4.x. For more information about Functions runtime versions, see [Azure Functions runtime versions overview](./functions-versions.md).
31
48
32
-
Migrating a C# function app from version 1.x to version 4.x of the Functions runtime requires you to make changes to your project code. Many of these changes are a result of changes in the C# language and .NET APIs. JavaScript apps generally don't require code changes to migrate.
49
+
## Choose your target .NET version
50
+
51
+
On version 1.x of the Functions runtime, your C# function app targets .NET Framework.
33
52
34
-
You can upgrade your C# project to one of the following versions of .NET, all of which can run on Functions version 4.x:
> **Unless your app depends on a library or API only available to .NET Framework, we recommend upgrading to .NET 6 on the isolated worker model.** Many apps on version 1.x target .NET Framework only because that is what was available when they were created. Additional capabilities are available to more recent versions of .NET, and if your app is not forced to stay on .NET Framework due to a dependency, you should upgrade.
57
+
>
58
+
> Migrating to the isolated worker model will require additional code changes as part of this migration, but it will give your app [additional benefits](./dotnet-isolated-in-process-differences.md), including the ability to more easily target future versions of .NET. The [.NET Upgrade Assistant] can also handle many of the necessary code changes for you.
42
59
43
-
<sup>*</sup> [In-process execution](./functions-dotnet-class-library.md) is only supported for Long Term Support (LTS) releases of .NET. Non-LTS releases and .NET Framework require you to run in an [isolated worker process](./dotnet-isolated-process-guide.md). For a feature and functionality comparison between the two process models, see [Differences between in-process and isolate worker process .NET Azure Functions](./dotnet-isolated-in-process-differences.md).
44
60
::: zone-end
61
+
45
62
::: zone pivot="programming-language-javascript,programming-language-csharp"
46
-
This article walks you through the process of safely migrating your function app to run on version 4.x of the Functions runtime.
47
63
48
64
## Prepare for migration
49
65
@@ -72,12 +88,18 @@ Before you upgrade your app to version 4.x of the Functions runtime, you should
72
88
* Consider using a [staging slot](functions-deployment-slots.md) to test and verify your app in Azure on the new runtime version. You can then deploy your app with the updated version settings to the production slot. For more information, see [Migrate using slots](#upgrade-using-slots).
73
89
::: zone-end
74
90
::: zone pivot="programming-language-csharp"
91
+
75
92
## Update your project files
76
93
77
94
The following sections describes the updates you must make to your C# project files to be able to run on one of the supported versions of .NET in Functions version 4.x. The updates shown are ones common to most projects. Your project code may require updates not mentioned in this article, especially when using custom NuGet packages.
78
95
96
+
Migrating a C# function app from version 1.x to version 4.x of the Functions runtime requires you to make changes to your project code. Many of these changes are a result of changes in the C# language and .NET APIs.
97
+
79
98
Choose the tab that matches your target version of .NET and the desired process model (in-process or isolated worker process).
80
99
100
+
> [!TIP]
101
+
> The [.NET Upgrade Assistant] can be used to automatically make many of the changes mentioned in the following sections.
102
+
81
103
### .csproj file
82
104
83
105
The following example is a .csproj project file that runs on version 1.x:
@@ -425,3 +447,5 @@ In version 2.x, the following changes were made:
425
447
426
448
> [!div class="nextstepaction"]
427
449
> [Learn more about Functions versions](functions-versions.md)
Azure Functions version 4.x is highly backwards compatible to version 3.x. Most apps should safely upgrade to 4.x without requiring significant code changes. For more information about Functions runtime versions, see [Azure Functions runtime versions overview](./functions-versions.md).
14
14
15
15
> [!IMPORTANT]
16
-
> Beginning on December 13, 2022, function apps running on versions 2.x and 3.x of the Azure Functions runtime have reached the end of life (EOL) of extended support.
16
+
> As of December 13, 2022, function apps running on versions 2.x and 3.x of the Azure Functions runtime have reached the end of life (EOL) of extended support.
17
17
>
18
-
> After the deadline, function apps can be created and deployed from your CI/CD DevOps pipeline, and all existing apps continue to run without breaking changes. However, your apps are not eligible for new features, security patches, and performance optimizations. You'll get related service support once you upgraded them to version 4.x.
18
+
> Apps using versions 2.x and 3.x can still be created and deployed from your CI/CD DevOps pipeline, and all existing apps continue to run without breaking changes. However, your apps are not eligible for new features, security patches, and performance optimizations. You'll only get related service support once you upgrade them to version 4.x.
19
19
>
20
-
>End of support for these runtime versions is due to the ending of support for .NET Core 3.1, which is required by these older runtime versions. This requirement affects all [languages supported by Azure Functions](supported-languages.md).
20
+
>End of support for these older runtime versions is due to the end of support for .NET Core 3.1, which they had as a core dependency. This requirement affects all [languages supported by Azure Functions](supported-languages.md).
21
21
>
22
-
>We highly recommend you migrating your function apps to version 4.x of the Functions runtime by following this article.
23
-
>
24
-
>Functions version 1.x is still supported for C# function apps that require the .NET Framework. Preview support is now available in Functions 4.x to [run C# functions on .NET Framework 4.8](dotnet-isolated-process-guide.md#supported-versions).
25
-
22
+
> We highly recommend that you migrate your function apps to version 4.x of the Functions runtime by following this article.
26
23
27
24
This article walks you through the process of safely migrating your function app to run on version 4.x of the Functions runtime. Because project upgrade instructions are language dependent, make sure to choose your development language from the selector at the [top of the article](#top).
28
25
29
26
::: zone pivot="programming-language-csharp"
30
-
## Choose your target .NET
31
-
32
27
33
-
On version 3.x of the Functions runtime, your C# function app targets .NET Core 3.1. When you migrate your function app to version 4.x, you have the opportunity to choose the target version of .NET. You can upgrade your C# project to one of the following versions of .NET, all of which can run on Functions version 4.x:
On version 3.x of the Functions runtime, your C# function app targets .NET Core 3.1 using the in-process model or .NET 5 using the isolated worker model.
40
31
41
-
<sup>*</sup> [In-process execution](./functions-dotnet-class-library.md) is only supported for Long Term Support (LTS) releases of .NET. Standard Terms Support (STS) releases and .NET Framework are supported .NET Azure functions [isolated worker process](./dotnet-isolated-process-guide.md).
> On version 3.x of the Functions runtime, if you're on .NET 5, we recommend you upgrade to .NET 7. If you're on .NET Core 3.1, we recommend you upgrade to .NET 6 (in-process) for a quick upgrade path.
35
+
> **If you're migrating from .NET 5 (on the isolated worker model), we recommend upgrading to .NET 6 on the isolated worker model.** This provides a quick upgrade path with the longest support window from .NET.
45
36
>
46
-
> If you're looking for moving to a Long Term Support (LTS) .NET release, we recommend you upgrade to .NET 6 .
47
-
>
48
-
> Migrating to .NET Isolated worker model to get all benefits provided by Azure Functions .NET isolated worker process. For more information about .NET isolated worker process advantages see [.NET isolated worker process enhancement](./dotnet-isolated-in-process-differences.md). For more information about .NET version support, see [Supported versions](./dotnet-isolated-process-guide.md#supported-versions).
37
+
> **If you're migrating from .NET Core 3.1 (on the in-process model), we recommend upgrading to .NET 6 on the in-process model.** This provides a quick upgrade path. However, you might also consider upgrading to .NET 6 on the isolated worker model. Switching to the isolated worker model will require additional code changes as part of this migration, but it will give your app [additional benefits](./dotnet-isolated-in-process-differences.md), including the ability to more easily target future versions of .NET. The [.NET Upgrade Assistant] can also handle many of the necessary code changes for you.
49
38
50
-
Upgrading from .NET Core 3.1 to .NET 6 running in-process requires minimal updates to your project and virtually no updates to code. Switching to the isolated worker process model requires you to make changes to your code, but provides the flexibility of being able to easily run on any future version of .NET. For a feature and functionality comparison between the two process models, see [Differences between in-process and isolate worker process .NET Azure Functions](./dotnet-isolated-in-process-differences.md).
51
39
::: zone-end
52
40
53
41
## Prepare for migration
@@ -88,6 +76,9 @@ Upgrading instructions are language dependent. If you don't see your language, c
88
76
89
77
Choose the tab that matches your target version of .NET and the desired process model (in-process or isolated worker process).
90
78
79
+
> [!TIP]
80
+
> The [.NET Upgrade Assistant] can be used to automatically make many of the changes mentioned in the following sections.
81
+
91
82
### .csproj file
92
83
93
84
The following example is a .csproj project file that uses .NET Core 3.1 on version 3.x:
@@ -307,3 +298,5 @@ If you don't see your programming language, go select it from the [top of the pa
307
298
308
299
> [!div class="nextstepaction"]
309
300
> [Learn more about Functions versions](functions-versions.md)
When you migrate your function app to version 4.x, you have the opportunity to choose the target version of .NET. You can upgrade your C# project to one of the following versions of .NET, all of which can run on Functions version 4.x:
10
+
11
+
| .NET version |[.NET Official Support Policy] release type | Functions process model<sup>1</sup> |
12
+
| --- | --- | --- |
13
+
| .NET 7 | STS (end of support May 14, 2024) |[Isolated worker model]|
14
+
| .NET 6 | LTS (end of support November 12, 2024) |[Isolated worker model],<br/>[In-process model]|
<sup>1</sup> The [isolated worker model] supports Long Term Support (LTS) and Standard Term Support (STS) versions of .NET, as well as .NET Framework. The [in-process model] only supports LTS releases of .NET. For a full feature and functionality comparison between the two models, see [Differences between in-process and isolate worker process .NET Azure Functions](../articles/azure-functions/dotnet-isolated-in-process-differences.md).
18
+
19
+
[.NET Official Support Policy]: https://dotnet.microsoft.com/platform/support/policy
Copy file name to clipboardExpand all lines: includes/functions-dotnet-supported-versions.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.author: glenga
8
8
9
9
## Supported versions
10
10
11
-
Versions of the Functions runtime work with specific versions of .NET. To learn more about Functions versions, see [Azure Functions runtime versions overview](../articles/azure-functions/functions-versions.md). Version support depends on whether your functions run in-process or isolated worker process.
11
+
Versions of the Functions runtime support specific versions of .NET. To learn more about Functions versions, see [Azure Functions runtime versions overview](../articles/azure-functions/functions-versions.md). Version support also depends on whether your functions run in-process or isolated worker process.
12
12
13
13
>[!NOTE]
14
14
>To learn how to change the Functions runtime version used by your function app, see [view and update the current runtime version](../articles/azure-functions/set-runtime-version.md#view-and-update-the-current-runtime-version).
@@ -17,9 +17,15 @@ The following table shows the highest level of .NET Core or .NET Framework that
17
17
18
18
| Functions runtime version | In-process<br/>([.NET class library](../articles/azure-functions/functions-dotnet-class-library.md)) | Isolated worker process<br/>([.NET Isolated](../articles/azure-functions/dotnet-isolated-process-guide.md)) |
<sup>1</sup> Build process also requires [.NET 6 SDK](https://dotnet.microsoft.com/download).
23
+
<sup>1</sup> Per the [.NET Official Support Policy], .NET 6 will reach end of support on November 12, 2024.
24
+
25
+
<sup>2</sup> Per the [.NET Official Support Policy], .NET 7 will reach end of support on May 14, 2024.
26
+
27
+
<sup>2</sup> Build process also requires [.NET 6 SDK](https://dotnet.microsoft.com/download).
24
28
25
29
For the latest news about Azure Functions releases, including the removal of specific older minor versions, monitor [Azure App Service announcements](https://github.com/Azure/app-service-announcements/issues).
30
+
31
+
[.NET Official Support Policy]: https://dotnet.microsoft.com/platform/support/policy
0 commit comments