.NET on Azure Functions Roadmap
Published Mar 10 2021 09:00 AM 73.3K Views
Microsoft

dotnet-functions-cover.png

(2022-09-12 - we've posted a new update that builds upon this one. See the latest update.)


Today, we announced support for running production .NET 5 apps on Azure Functions. With this release, we now support running .NET functions in a standalone process. Running in an isolated process decouples .NET functions from the Azure Functions host—allowing us to more easily support new .NET versions and address pain points associated with sharing a single process. However, creating this new isolated process model required significant effort and we were unable to immediately support .NET 5. This delay was not due to lack of planning or prioritization, but we understand the frustration from those of you who wished to move application architectures to the latest bits and weren't able to do so until Azure Functions could run .NET 5.

 

One of our learnings during this release was the need for us to be more proactive and open about our plans and roadmap, specifically with .NET. In this post we’ll go into details on this new isolated process model for .NET function apps and share our roadmap for supporting future versions of .NET.

 

.NET isolated process—a new way to run .NET on Azure Functions

 

The Azure Functions host is the runtime that powers Azure Functions and runs on .NET and .NET Core. Since the beginning, .NET and .NET Core function apps have run in the same process as the host. Sharing a process has enabled us to provide some unique benefits to .NET functions, most notably is a set of rich bindings and SDK injections. A .NET developer is able to trigger or bind directly to the SDKs and types used in the host process—including advanced types like CloudBlockBlob from the Storage SDK or Message from the Service Bus SDK—allowing users to do more in .NET functions with less code.

 

However, sharing the same process does come with some tradeoffs. In earlier versions of Azure Functions, dependencies could conflict (notable conflicting libraries include Newtonsoft.Json). While flexibility of packages was largely addressed in Azure Functions V2 and beyond, there are still restrictions on how much of the process is customizable by the user. Running in the same process also means that the .NET version of user code must match the .NET version of the host. These tradeoffs of sharing a process motivated us to choose an out-of-process model for .NET 5.

 

Other languages supported by Azure Functions use an out-of-process model that runs a language worker in a separate, isolated process from the main Azure Functions host. This allows Azure Functions to rapidly support new versions of these languages without updating the host, and it allows the host to evolve independently to enable new features and update its own dependencies over time.

 

Today’s .NET 5 release is our first iteration of running .NET in a separate process. With .NET now following an annual release cadence and .NET 5 not being a long-term supported (LTS) release, we decided this is the right time to begin this journey.

 

A .NET 5 function app runs in an isolated worker process. Instead of building a .NET library loaded by our host, you build a .NET console app that references a worker SDK. This brings immediate benefits: you have full control over the application’s startup and the dependencies it consumes. The new programming model also adds support for custom middleware which has been a frequently requested feature.

 

While this isolated model for .NET brings the above benefits, it’s worth noting there are some features you may have utilized in previous versions that aren’t yet supported. While the .NET isolated model supports most Azure Functions triggers and bindings, Durable Functions and rich types support are currently unavailable. Take a blob trigger for example, you are limited to passing blob content using data types that are supported in the out-of-process language worker model, which today are string, byte[], and POCO. You can still use Azure SDK types like CloudBlockBlob, but you’ll need to instantiate the SDK in your function process.

 

Many of these temporary gaps will close as the new isolated model continues to evolve. However, there are no current plans to close any of these gaps in the .NET 5 timeframe. They will more likely will land in 2022. If any of these limitations are blocking, we recommend you continue to use .NET Core 3.1 in the in-process model.

 

.NET 5 on Azure Functions

 

You can run .NET 5 on Azure Functions in production today using the .NET isolated worker. Currently, full tooling support is available in Azure CLI, Azure Functions Core Tools, and Visual Studio Code. You can edit and debug .NET 5 projects in Visual Studio; full support is in progress and estimated to be available in a couple of months.

 

Future of .NET on Azure Functions

 

dotnet-functions-roadmap.png

 

One of the most frequent pieces of feedback we’ve received is that Azure Functions needs to support new versions of .NET as soon as they’re available. We agree, and we have a plan to provide day 1 support for future LTS and non-LTS .NET versions.

 

.NET 6 LTS

 

.NET 6 functions will support both in-process and isolated process options.  The in-process option will support the full feature set available in .NET Core 3.1 functions today, including Durable Functions and rich binding types. The isolated process option will provide an upgrade path for apps using this option for .NET 5 and initially will have the same feature set and limitations.

 

A few weeks ago, the .NET team released the first preview of .NET 6. In the first half of 2021, we will deliver a version of the Azure Functions host for running functions on .NET 6 preview using the in-process model. The initial preview of .NET 6 on Azure Functions will run locally and in containers. In the summer, we expect .NET 6 preview to be available on our platform and you’ll be able to deploy .NET 6 preview function apps without the use of containers.

 

On the same day .NET 6 LTS reaches general availability in November, you’ll be able to deploy and run .NET 6 Azure Functions.

 

.NET 7 and beyond

 

Long term, our vision is to have full feature parity out of process, bringing many of the features that are currently exclusive to the in-process model to the isolated model. We plan to begin delivering improvements to the isolated model after the .NET 6 general availability release.

 

.NET 7 is scheduled for the second half of 2022, and we plan to support .NET 7 on day 1 exclusively in the isolated model. We expect that you’ll be able to migrate and run almost any .NET serverless workload in the isolated worker—including Durable Functions and other targeted improvements to the isolated model.

 

.NET Framework

 

Currently, .NET Framework is supported in the Azure Functions V1 host. As the isolated model for .NET continues to evolve, we will investigate the feasibility of running the .NET isolated worker SDK in .NET Framework apps. This could allow users to develop apps targeting .NET Framework on newer versions of the functions runtime.

 

 

We are thrilled by the adoption and solutions we see running on Azure Functions today, accounting for billions of function executions every day.  We are deeply grateful for the .NET community, many of you have been with us since day 1. Our hope is that this post gives clarity on our plans for supporting future versions of .NET on Azure Functions and evolving the programming model.  Supporting our differentiated features while removing the constraints of the in-process model is a non-trivial task, and we plan to be open and communicative throughout the journey.  We’ll be conducting a special .NET roadmap webcast on March 25 where we will make time to answer any questions you may have.

 

To get started building Azure Functions in .NET 5, check out Develop and publish .NET 5 functions.

 

 

13 Comments
Copper Contributor

Good news, from a security POV, process isolation mode it's a must when available - unless I'm missing something here. :p

 

And the fact that we would be able to use. Net code as soon as the new version is release in Azure Function would help a lot at keeping updated code at the same level -that's not an easy task sometimes :) 

Copper Contributor

Thanks for this detailed information. But for the avoidance of doubt, is it the expectation the next version in which durable NET functions will be supported will be NET7 in H2 2022?

Copper Contributor

Wait... wut? According to the documentation the nuget package Microsoft.Azure.Functions.Worker is required. I'm not sure why it need everything including the kitchen sink, but okay... I guess? Like why would I need to log to the windows EventLog?

 

Installing:

Azure.Core.1.10.0
Google.Protobuf.3.15.5
Grpc.Core.Api.2.35.0
Grpc.Net.Client.2.35.0
Grpc.Net.ClientFactory.2.35.0
Grpc.Net.Common.2.35.0
Microsoft.Azure.Functions.Worker.1.0.0
Microsoft.Azure.Functions.Worker.Core.1.0.0
Microsoft.Azure.Functions.Worker.Grpc.1.0.0
Microsoft.Bcl.AsyncInterfaces.1.0.0
Microsoft.Extensions.Configuration.5.0.0
Microsoft.Extensions.Configuration.Abstractions.5.0.0
Microsoft.Extensions.Configuration.Binder.5.0.0
Microsoft.Extensions.Configuration.CommandLine.5.0.0
Microsoft.Extensions.Configuration.EnvironmentVariables.5.0.0
Microsoft.Extensions.Configuration.FileExtensions.5.0.0
Microsoft.Extensions.Configuration.Json.5.0.0
Microsoft.Extensions.Configuration.UserSecrets.5.0.0
Microsoft.Extensions.DependencyInjection.5.0.0
Microsoft.Extensions.DependencyInjection.Abstractions.5.0.0
Microsoft.Extensions.FileProviders.Abstractions.5.0.0
Microsoft.Extensions.FileProviders.Physical.5.0.0
Microsoft.Extensions.FileSystemGlobbing.5.0.0
Microsoft.Extensions.Hosting.5.0.0
Microsoft.Extensions.Hosting.Abstractions.5.0.0
Microsoft.Extensions.Http.3.0.3
Microsoft.Extensions.Logging.5.0.0
Microsoft.Extensions.Logging.Abstractions.5.0.0
Microsoft.Extensions.Logging.Configuration.5.0.0
Microsoft.Extensions.Logging.Console.5.0.0
Microsoft.Extensions.Logging.Debug.5.0.0
Microsoft.Extensions.Logging.EventLog.5.0.0
Microsoft.Extensions.Logging.EventSource.5.0.0
Microsoft.Extensions.Options.5.0.0
Microsoft.Extensions.Options.ConfigurationExtensions.5.0.0
Microsoft.Extensions.Primitives.5.0.0
Microsoft.NETCore.Platforms.5.0.0
Microsoft.Win32.Registry.5.0.0
System.Buffers.4.5.0
System.Diagnostics.DiagnosticSource.4.6.0
System.Diagnostics.EventLog.5.0.0
System.Memory.4.5.3
System.Memory.Data.1.0.1
System.Numerics.Vectors.4.5.0
System.Runtime.CompilerServices.Unsafe.4.5.2
System.Security.AccessControl.5.0.0
System.Security.Principal.Windows.5.0.0
System.Text.Json.4.6.0
System.Threading.Tasks.Extensions.4.5.2

 

Microsoft

@gonkers Can you please file an issue here to discuss? Thanks. https://github.com/Azure/azure-functions-dotnet-worker/issues

Microsoft

@baouss The in-process .NET 6 release will have Durable Functions. This is coming in preview this summer, and GA in November 2021.

 

For the isolated process .NET worker, we do not have a confirmed date for Durable Functions but we expect it to arrive sometime in 2022, perhaps earlier. When it arrives, you can use it with .NET 6 or later.

Copper Contributor

Take a blob trigger for example, you are limited to passing blob content using data types that are supported in the out-of-process language worker model, which today are string, byte[], and POCO. You can still use Azure SDK types like CloudBlockBlob, but you’ll need to instantiate the SDK in your function process.

 

What is the impact of this on the memory cost of the function? Will it be included in the memory size as we are explicitly instantiating the SDK or will it be considered as part of the hosting process/environment?

Copper Contributor

When will Visual Studio 2019 have proper tooling and support?

Microsoft

@mwwhited That should arrive in VS 2019 v16.10 in ~May.

Copper Contributor

Is there a sample of integrating SignalR with the .Net 5 and the isolated process?  If not could you provide guidance on how to integrate SignalR with .net 5 AZ functions?

Microsoft

@Michael Gerfen Take a look at this video for a walk through. Over time we will add more samples and content, but hopefully that’s enough to get you started. https://youtu.be/zVKc5g0Jz6Q

Copper Contributor

This video was quite helpful, thanks @Anthony Chu.  In particular, I hadn't been able to find an updated prototype/implementation for the Negotiate function using the .NET 5 isolated process extensions; it would be great to make that code block available somewhere in the documentation.

Copper Contributor

Is there a guide on updating Az Function to .Net 5?

Copper Contributor

#1) Thank you for this article... After 6 days of pulling out my hair, finally a source that simply says "Durable Functions not in 5.0 Core". 
#2) To the docs.microsoft.com team - why is this not on the banner of EVERY page that mentions durable functions?
#3)  As more Functions are being deployed, it looks like we may be stuck with 3.1 core - but I have yet to find information on effectively unit testing something that needs to be in the Azure environment - any assistance in this appreciated...

Version history
Last update:
‎Sep 12 2022 10:49 AM
Updated by: