# .NET 11 Ships: C# 15 Unions, Native AOT, and MCP Built In

> Source: <https://byteiota.com/net-11-ships-c-15-unions-native-aot-and-mcp-built-in/>
> Published: 2026-11-16 12:07:02+00:00

.NET 11 landed on November 10 at .NET Conf 2026, and it comes with the feature C# developers have been requesting since at least 2017: union types. C# 15 adds them alongside a rewritten async runtime that benchmarks at 3.5x faster for the common non-suspending case, a Native AOT CLI host that trims 600–700ms off every `dotnet` command, and an MCP server template baked into the SDK. That last one is easy to miss in the release notes — and it shouldn’t be.

## Union Types: C# Finally Gets Sum Types

The headline language change is C# 15’s new `union` keyword, which declares a closed set of types that need no common base class. This solves a real problem: expressing “this value is either a T or an Exception” without abusing inheritance, out parameters, or libraries like [OneOf](https://github.com/mcintyre321/OneOf).

```
public union Result<T>(T Value, Exception Error);

string Describe(Result<int> r) => r switch {
    int v       => $"Got {v}",
    Exception e => $"Failed: {e.Message}"
};
```

The compiler enforces exhaustive pattern matching — a `switch` that covers every case in the union compiles without a discard arm. If you add a new case to the union later, every unhandled switch site becomes a compile error. That’s the same guarantee Rust developers get from `enum` and TypeScript developers approximate with the `|` operator. C# is arriving late to this party, but the implementation is clean.

Closed hierarchies — the companion feature for types that *do* share a base class — ship alongside unions. The `closed` keyword tells the compiler the inheritance tree is complete. If you’ve been using the discriminated-union pattern with abstract records, closed hierarchies let the compiler verify what you were previously enforcing by convention. [Microsoft’s ASP.NET Core guide](https://devblogs.microsoft.com/dotnet/unions-and-closed-hierarchies-in-aspnetcore/) shows both patterns in a real HTTP result pipeline — worth reading if you’re deciding which to reach for first.

## Runtime Async: 3.5x Faster, No Migration Required

The async improvements in .NET 11 are opt-in, but the numbers are good enough that you should opt in. The core change: async state machines that C# previously generated at compile time are now produced by the JIT. The compiler emits a leaner IL contract and marks the method async in metadata; the runtime handles suspend and resume itself.

The practical result for a 20-layer non-suspending async chain: 44 ns and 72 bytes of allocation versus 155 ns and 1,512 bytes on .NET 10. That’s 3.5x faster and 21x less memory. For the more common suspending case — where the chain actually yields — the gains are more modest: 13% faster, 26% less allocation. [Independent benchmarks](https://dev.to/frankchu/5-frames-32x-faster-i-measured-net-11-runtime-async-4k73) show real-world stack frames dropping from 17 to 5 for typical middleware pipelines.

Runtime async is opt-in via a project property in .NET 11 and becomes the default in .NET 12. If you’re on a performance-sensitive service, it’s worth turning on today.

## The CLI Is Faster Too

Native AOT is now the default for the `dotnet` CLI host. Commands like `dotnet build`, `dotnet test`, and `dotnet --version` no longer pay the managed runtime startup cost. Microsoft puts the savings at 600–700ms per invocation. Run `dotnet` forty times in a typical workday — not unusual in active development — and that’s roughly 25 seconds of wall time reclaimed. Linux and macOS installers are also smaller via assembly deduplication in the new CLI host.

## MCP in the Box

The less-obvious addition to .NET 11 is `dotnet new mcpserver`. The [Model Context Protocol](https://modelcontextprotocol.io) server template ships with the SDK, built on the official MCP C# SDK alongside `Microsoft.Extensions.AI` and the Microsoft Agent Framework. You can scaffold an MCP server, connect it to an AI model, and have agents calling tools with conversation state in a few minutes.

MCP has become the de facto standard for agent-tool communication in 2026, with over 10,000 production servers deployed. Python and TypeScript have had first-class MCP libraries for a while; .NET 11 closes that gap at the SDK level. For teams building enterprise agents on .NET, the message is clear: you don’t need to leave the ecosystem to participate in the AI-native stack.

## Should You Upgrade?

.NET 11 is STS — Standard Term Support — meaning two years of patches through November 9, 2028. It is not an LTS release. [.NET 10 LTS](https://learn.microsoft.com/en-us/dotnet/core/releases-and-support) (three years, until November 2028) remains the right choice for teams with the longest possible upgrade runway or compliance requirements that mandate LTS. If you’re starting a new service today, or you can commit to upgrading to .NET 12 LTS when it arrives in roughly a year, .NET 11 makes sense.

The release deserves more than the usual STS shrug. Union types change how you model domain errors. Runtime async improvements compound across every I/O-heavy service. The MCP template makes .NET a credible starting point for agent development without a third-party library. These aren’t cosmetic improvements — they close real gaps that have been open for years. The [official announcement](https://devblogs.microsoft.com/dotnet/announcing-dotnet-11/) has the full migration notes if you’re ready to move.
