Skip to content

Commit 60df1b3

Browse files
Merge pull request #246696 from mattchenderson/upgradeassist
updating .net references for migration
2 parents 2cda20c + 7fad90f commit 60df1b3

8 files changed

+89
-46
lines changed

articles/azure-functions/TOC.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,6 @@
394394
href: functions-reference-csharp.md
395395
- name: Execution mode comparison
396396
href: dotnet-isolated-in-process-differences.md
397-
- name: F#
398-
href: functions-reference-fsharp.md
399397
- name: Node.js
400398
items:
401399
- name: JavaScript

articles/azure-functions/language-support-policy.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ To learn more about specific language version support policy timeline, visit the
4848

4949
|Language | Configuration guides |
5050
|-----------------------------------------|-----------------|
51-
|C# (class library) |[link](./functions-dotnet-class-library.md#supported-versions)|
51+
|C# (in-process model) |[link](./functions-dotnet-class-library.md#supported-versions)|
52+
|C# (isolated worker model) |[link](./dotnet-isolated-process-guide.md#supported-versions)|
5253
|Node |[link](./functions-reference-node.md#setting-the-node-version)|
5354
|PowerShell |[link](./functions-reference-powershell.md#changing-the-powershell-version)|
5455
|Python |[link](./functions-reference-python.md#python-version)|

articles/azure-functions/migrate-version-1-version-4.md

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,58 @@ ms.custom: template-how-to-pattern, devx-track-extended-java, devx-track-js, dev
88
zone_pivot_groups: programming-languages-set-functions
99
---
1010

11-
# Migrate apps from Azure Functions version 1.x to version 4.x
11+
# <a name="top"></a>Migrate apps from Azure Functions version 1.x to version 4.x
1212

1313
::: zone pivot="programming-language-java"
14+
1415
> [!IMPORTANT]
1516
> 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+
1618
::: zone-end
19+
1720
::: zone pivot="programming-language-typescript"
21+
1822
> [!IMPORTANT]
1923
> 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+
2025
::: zone-end
26+
2127
::: zone pivot="programming-language-powershell"
28+
2229
> [!IMPORTANT]
2330
> 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+
2432
::: zone-end
33+
2534
::: zone pivot="programming-language-python"
35+
2636
> [!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+
2839
::: 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+
2947
::: 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).
3148

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.
3352

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:
53+
[!INCLUDE [functions-dotnet-migrate-v4-versions](../../includes/functions-dotnet-migrate-v4-versions.md)]
3554

36-
| .NET version | Process model<sup>*</sup> |
37-
| --- | --- | --- |
38-
| .NET 7 | [Isolated worker process](./dotnet-isolated-process-guide.md) |
39-
| .NET 6 | [Isolated worker process](./dotnet-isolated-process-guide.md) |
40-
| .NET 6 | [In-process](./functions-dotnet-class-library.md) |
41-
| .NET&nbsp;Framework&nbsp;4.8 | [Isolated worker process](./dotnet-isolated-process-guide.md) |
55+
> [!TIP]
56+
> **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.
4259
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).
4460
::: zone-end
61+
4562
::: 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.
4763

4864
## Prepare for migration
4965

@@ -72,12 +88,18 @@ Before you upgrade your app to version 4.x of the Functions runtime, you should
7288
* 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).
7389
::: zone-end
7490
::: zone pivot="programming-language-csharp"
91+
7592
## Update your project files
7693

7794
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.
7895

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+
7998
Choose the tab that matches your target version of .NET and the desired process model (in-process or isolated worker process).
8099

100+
> [!TIP]
101+
> The [.NET Upgrade Assistant] can be used to automatically make many of the changes mentioned in the following sections.
102+
81103
### .csproj file
82104

83105
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:
425447

426448
> [!div class="nextstepaction"]
427449
> [Learn more about Functions versions](functions-versions.md)
450+
451+
[.NET Upgrade Assistant]: /dotnet/core/porting/upgrade-assistant-overview

articles/azure-functions/migrate-version-3-version-4.md

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,29 @@ zone_pivot_groups: programming-languages-set-functions
1313
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).
1414

1515
> [!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.
1717
>
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.
1919
>
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).
2121
>
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.
2623
2724
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).
2825

2926
::: zone pivot="programming-language-csharp"
30-
## Choose your target .NET
31-
3227

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:
28+
## Choose your target .NET version
3429

35-
| .NET version | Process model<sup>*</sup> |
36-
| --- | --- | --- |
37-
| .NET 7 | [Isolated worker process](./dotnet-isolated-process-guide.md) |
38-
| .NET 6 | [Isolated worker process](./dotnet-isolated-process-guide.md) |
39-
| .NET 6 | [In-process](./functions-dotnet-class-library.md) |
30+
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.
4031

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).
32+
[!INCLUDE [functions-dotnet-migrate-v4-versions](../../includes/functions-dotnet-migrate-v4-versions.md)]
4233

4334
> [!TIP]
44-
> 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.
4536
>
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.
4938
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).
5139
::: zone-end
5240

5341
## Prepare for migration
@@ -88,6 +76,9 @@ Upgrading instructions are language dependent. If you don't see your language, c
8876

8977
Choose the tab that matches your target version of .NET and the desired process model (in-process or isolated worker process).
9078

79+
> [!TIP]
80+
> The [.NET Upgrade Assistant] can be used to automatically make many of the changes mentioned in the following sections.
81+
9182
### .csproj file
9283

9384
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
307298

308299
> [!div class="nextstepaction"]
309300
> [Learn more about Functions versions](functions-versions.md)
301+
302+
[.NET Upgrade Assistant]: /dotnet/core/porting/upgrade-assistant-overview
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
author: mattchenderson
3+
ms.service: azure-functions
4+
ms.topic: include
5+
ms.date: 07/28/2023
6+
ms.author: mahender
7+
---
8+
9+
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] |
15+
| .NET Framework 4.8 | [See policy][netfxpolicy] | [Isolated worker model] |
16+
17+
<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
20+
[netfxpolicy]: https://dotnet.microsoft.com/platform/support/policy/dotnet-framework
21+
[Isolated worker model]: ../articles/azure-functions/dotnet-isolated-process-guide.md
22+
[In-process model]: ../articles/azure-functions/functions-dotnet-class-library.md

includes/functions-dotnet-supported-versions.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.author: glenga
88

99
## Supported versions
1010

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.
1212

1313
>[!NOTE]
1414
>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
1717

1818
| 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)) |
1919
| ---- | ---- | --- |
20-
| Functions 4.x | .NET 6.0 | .NET 6.0<br/>.NET 7.0 (GA)<sup>1</sup><br/>.NET Framework 4.8 (GA)<sup>1</sup> |
20+
| Functions 4.x | .NET 6.0<sup>1</sup> | .NET 6.0<sup>1</sup><br/>.NET 7.0 (GA)<sup>2,3</sup><br/>.NET Framework 4.8 (GA)<sup>3</sup> |
2121
| Functions 1.x | .NET Framework 4.8 | n/a |
2222

23-
<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).
2428

2529
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

Comments
 (0)