cd /news/developer-tools/net-11-ships-c-15-unions-native-aot-… · home › topics › developer-tools › article
[ARTICLE · art-170549] src=byteiota.com ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

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

.NET 11 shipped on November 10 at .NET Conf 2026, adding C# 15 union types with compiler-enforced exhaustive pattern matching, a JIT-based runtime async model that Microsoft benchmarks at 3.5x faster and 21x less memory (44 ns and 72 bytes versus 155 ns and 1,512 bytes on .NET 10) for a 20-layer non-suspending async chain, and a Native AOT CLI host that Microsoft says saves 600–700ms per dotnet command. The release also ships a `dotnet new mcpserver` Model Context Protocol server template in the SDK, built on the official MCP C# SDK alongside Microsoft.Extensions.AI and the Microsoft Agent Framework. Runtime async is opt-in in .NET 11 via a project property and becomes the default in .NET 12.

read4 min views3 publishedNov 16, 2026
.NET 11 Ships: C# 15 Unions, Native AOT, and MCP Built In
Image: Byteiota (auto-discovered)

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

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 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 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 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 (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 has the full migration notes if you’re ready to move.

── more in #developer-tools 4 stories · sorted by recency
devblogs.microsoft.com · · #developer-tools
.NET 11
── more on @.net 11 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/net-11-ships-c-15-un…] indexed:0 read:4min 2026-11-16 · —