NewsProgramming LanguagesPerformance

.NET 11 Ships Nov 10: Runtime Async and C# 15 Union Types

Abstract visualization of .NET 11 Runtime Async with blue glowing stack frames and async execution threads on dark background

.NET 11 ships November 10 — the same day both .NET 8 and .NET 9 reach end of life. The timing is deliberate: Microsoft is retiring two major versions simultaneously to force migrations, and .NET 11 is the new target. It is an STS release with 18 months of support, not the LTS track many enterprise teams prefer. But three features in this release deserve attention before the LTS crowd eventually catches up.

Runtime Async: The Biggest Change to async/await Since C# 5

Since C# 5 shipped in 2012, async/await has worked the same way: the compiler transforms async methods into heap-allocated state machine objects that capture local variables and resume points. Every await potentially means a heap allocation. At scale, this adds up.

.NET 11 changes the model. Runtime Async moves state machine transformation from the compiler into the JIT itself. The runtime can keep async state on the stack instead of boxing it on the heap — and the performance difference is not marginal.

A benchmark running 10 million awaits shows .NET 10 at 80ms with 687 MB allocated and 25 GC gen-0 collections. .NET 11 with Runtime Async enabled: 37ms, 94 KB allocated, zero GC collections. That is roughly 2x faster and around 7,400x less memory. Awaiting an already-completed task drops from 21ns to 6ns with zero bytes allocated instead of 144.

The opt-in is a single MSBuild property:

<PropertyGroup>
  <TargetFramework>net11.0</TargetFramework>
  <Features>runtime-async=on</Features>
</PropertyGroup>

Two hard limits: Runtime Async is incompatible with Blazor WebAssembly, and it is still a preview feature in .NET 11 — expected to become the default in .NET 12. Before enabling it in production, test ExecutionContext and AsyncLocal behavior in your application. Stack traces will look different, and that matters during incident response.

C# 15 Union Types: 14 Years Late, Still Worth It

F# developers have had discriminated unions for years. C# developers have been reaching for workarounds — the OneOf NuGet package, custom base classes, nullable returns — to express “this method returns either a result or an error, never null.” C# 15 adds a native union keyword.

The syntax composes existing types into a closed set:

public record class Customer(string Name, decimal CreditLimit);
public record class NotFound();
public record class LookupError(string Message);

public union CustomerLookupResult(Customer, NotFound, LookupError);

Switch expressions over union types are exhaustive by default. Add a new case and the compiler warns everywhere that switch does not handle it. The compiler generates a value type under the hood — no extra heap allocation for the union wrapper. Generic unions work the same way, making Result<TSuccess, TError> a two-line declaration.

Union types still require <LangVersion>preview</LangVersion> in .NET 11 — this is a preview language feature. But the design is stable enough to start learning the pattern now, especially if you are already on OneOf or similar libraries.

November 10: .NET 8 and .NET 9 Both Reach End of Life

.NET 8 is LTS, three years from its November 2023 release. .NET 9 is STS, with Microsoft extending support from 18 to 24 months — which pushed its end date from May 2026 to November 10, 2026. Both versions stop receiving security patches on the same day .NET 11 ships.

The pragmatic path depends on where you are:

  • On .NET 8 or .NET 9: upgrade now. .NET 10 LTS is the safe choice — supported until November 2028.
  • Already on .NET 10: no urgency. .NET 11 is STS with 18 months, not a long-term commitment.
  • Building new high-throughput services: .NET 11 with Runtime Async is worth a serious look.

MCP C# SDK v2.0: Build AI Tools Like a Normal App

The official Model Context Protocol C# SDK hits v2.0 alongside .NET 11. The headline change is stateless-by-default HTTP transport. Version 1 required stateful sessions, which meant sticky sessions in load balancers and extra infrastructure complexity. Version 2 flips the default:

// Program.cs — MCP server in ASP.NET Core
builder.Services.AddMcpServer()
    .WithHttpTransport(); // stateless by default in v2.0

An MCP server is now just an ASP.NET Core application. It containerizes cleanly, scales horizontally without special session affinity, and sits behind any standard reverse proxy or API gateway. If you have been putting off building AI tools on .NET because of the infrastructure overhead, v2.0 removes that excuse.

Should You Upgrade?

.NET 11 is not the conservative choice — .NET 10 LTS is. But for teams running microservices with heavy async workloads, the Runtime Async numbers are hard to ignore. The feature is opt-in and isolated to a build property, so it is testable without committing the entire application. Check the official .NET 11 release notes for the full list of what changed.

The C# 15 union types and MCP SDK v2.0 are worth learning regardless of which .NET version you ship. Start with the patterns now, even if you stay on .NET 10 for production stability. .NET Conf 2026 runs November 10-12 — Microsoft will have migration tooling and upgrade guidance ready by launch day.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:News