0% found this document useful (0 votes)
84 views

Azure Function Migration

Uploaded by

prasath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views

Azure Function Migration

Uploaded by

prasath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Migration of Azure Function

Runtime Version

@Copyright 2018 Version 1 – All Rights Reserved

Classificatio
n:
Controlled [Customer Name] Page 1
Table of Contents
1. INTRODUCTION.......................................................................3
2. DOT NET VERSIONS COMPATIBLITY........................................4
3. MIGRATION FROM 3.X TO 4.X..................................................5
3.1 .csproj file.........................................................................5
3.2 local.settings.json file........................................................6
3.3 Upgrade Function App in Azure..........................................6
3.4 Breaking changes between 3.x and 4.x..............................6
4. MIGRATION FROM 1.X TO 3.X....................................................7
4.1 .csproj file.........................................................................7
4.2 local.settings.json file........................................................8
4.3 Class Name Changes..........................................................8
4.4 Upgrade function app in azure...........................................8

Classificatio
n:
Controlled [Customer Name] Page 2
1. INTRODUCTION

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

 After the deadline, function apps can be created and deployed


from CI/CD DevOps pipeline, and all existing apps continue to
run without breaking changes. However, function apps are not
eligible for new features, security patches, and performance
optimizations. Function apps will get related service support once
it’s upgraded to version 4.x.

Classificatio
n:
Controlled [Customer Name] Page 3
2. DOT NET VERSIONS COMPATIBLITY

.NET version Process model Support Type


.NET 7 Isolated worker process Short Term
.NET 6 Isolated worker process Short Term
.NET 6 In-process Long Term
.NET Framework 4.8 Isolated worker process Short Term

As per the above table Dot Net 6 has the long-term support. So
Considered Dot Net 6 for the Migration Documentation. Referred Link

Classificatio
n:
Controlled [Customer Name] Page 4
3.MIGRATION FROM 3.X TO 4.X
For the documentation, we have considered only Dot Net (C#) Azure
function migration from version 3.x to 4.x. For Other Languages please
refer this Microsoft Documentation.

3.1 .csproj file

The following example is a .csproj project file that uses .NET Core 3.1 on
version 3.x

1. Right click on the function, and select properties then select General,
we can find the Target framework dropdown , pick the .Net6

Or

Change the value of Property Group. Target Framework to net6.0


directly in .csproj xml

2. Change the value of PropertyGroup.AzureFunctionsVersion to v4


in .csproj xml.

3. Update the Nuget package Microsoft.NET.Sdk.Functions package


version to 4.1.1

Classificatio
n:
Controlled [Customer Name] Page 5
After update the .csproj xml file should look like below.

3.2 local.settings.json file

3.3 Upgrade Function App in Azure

Need to upgrade the runtime of the function app host in Azure to version 4.x
before you publish your migrated project. The runtime version used by the
Functions host is controlled by the FUNCTIONS_EXTENSION_VERSION
application setting.

3.4 Breaking changes between 3.x and 4.x

Please refer this Microsoft documentation to rectify the errors occurring


during this migration based on the resources that we invoked in azure
function.

Classificatio
n:
Controlled [Customer Name] Page 6
4. MIGRATION FROM 1.X TO 3.X
For the documentation, we have considered only Dot Net (C#) Azure
function migration from version 1.x to 3.x because first we are
planning to migrate to 3.x and after testing can be migrated to 4.x.
Directly also we can migrate 1.x to 4.x, please refer this Microsoft
documentation.

4.1 .csproj file


The following example is a .csproj project file that uses .NET Framework 4.8
on version 1.x.

1. Change the value of Property Group.Target framework to “netcoreapp3.1”

directly in .csproj xml

2. Change the value of PropertyGroup.AzureFunctionsVersion to v3 in .csproj


xml.

3. Update the Nuget package Microsoft.NET.Sdk.Functions package version


to 3.0.13

Classificatio
n:
Controlled [Customer Name] Page 7
After update the .csproj xml file should look like below.

4.2 local.settings.json file

4.3 Class Name Changes

.Net FrameWork 4.8 .Net Core 3.1


FunctionName (attribute) FunctionName (attribute)
TraceWriter ILogger
HttpRequestMessage HttpRequest
HttpResonseMessage OkObjectResult

4.4 Upgrade function app in azure


Need to upgrade the runtime of the function app host in Azure to version 3.x
before you publish your migrated project. The runtime version used by the
Functions host is controlled by the FUNCTIONS_EXTENSION_VERSION
application setting.

Classificatio
n:
Controlled [Customer Name] Page 8

You might also like