Blog Post

Apps on Azure Blog
2 MIN READ

Announcing the .NET 7 support for Azure functions in an isolated process in public preview

MelonyQ's avatar
MelonyQ
Icon for Microsoft rankMicrosoft
Jul 18, 2022

We’re thrilled to announce that Azure functions v4 now supports .NET 7 as runtime. Azure Functions joins Azure Web Apps who also announced .NET 7 support today.

For those customers who are looking into building serverless functions in Azure with the latest innovation from .NET runtime, this makes it possible for all developers on the planet to focus on coding with .NET 7 new features, ready-to-code while on a large scale without worrying about the underlying infrastructure.

 

What’s new in .NET 7 with Azure functions

 

You can now build your serverless applications with .NET 7 in Azure Functions using the .NET Isolated Worker model, which provides an isolation model that decouples your function process from the Azure Functions runtime, bringing the flexibility needed to target different versions of .NET, more efficiently manage dependencies and service registration.

The isolated worker model also allows you to use current .NET behaviors for dependency injection and incorporating middleware into your function app. Choose the isolated model if you’re upgrading from .NET 5 Azure functions v3.  This feature is available for preview in all Windows-based plans, Linux dedicated, and premium plans.  Linux consumption plan will be added at a later date.

 

Update on 8/3/2022 :  .NET 7 on Azure function Linux Consumption Plan is supported, check it out here.

 

How to try it out?

 

There’s no difference as you’re used to create an Azure function in .NET 7 runtime in an isolated process. To date, we have core tools available to create a new Azure function in .NET 7.  Visual Studio support will be coming out at a later date.

 

Azure Functions Core tools

To get started, we could leverage Azure Functions Core Tools to scaffold an isolated project folder structure as follows:

 

 

 

 

func init --worker-runtime dotnet-isolated --target-framework net7.0

 

 

 

 

Then use func new command to scaffold an HTTP trigger function. The following is an example command to create a function called Net7function using an HTTP trigger: 

 

 

 

 

func new --name Net7Function --template "HTTP trigger"

 

 

 

 

And then you can use the func start command to test out this function.

 

 

 

 

func start

 

 

 

 

Next steps

 

We’re looking forward to hearing your feedback and your use cases, please feel free to share them on announcement related discussions here. Also, if you discover potential issues, please record them on the Azure Functions .NET language worker GitHub repository. 

 

Coming up, we’re also closely collaborating with the community and ensuring your voices are heard, check out our public-facing product roadmap from: http://aka.ms/af-dotnet-roadmap.

 

Start to build your serverless applications with .NET 7, check out the official documentation:

 

  • Getting started with Azure functions in an isolated process from here
  • Create your first .NET 7 functions with Azure Core tools from here

 

We’re excited about the road ahead with the continued innovation from .NET on Azure functions. Let’s stay tuned!

 

Updated Aug 19, 2022
Version 4.0
No CommentsBe the first to comment