Microsoft releases .NET 11 with C# 15 union types and AI tooling

Microsoft releases .NET 11 with C# 15 union types and AI tooling

Microsoft announced the release of .NET 11 on the .NET devblog, timed with .NET Conf 2026 (November 10-13). The post says the release makes building applications faster and more productive, with changes across C# 15, ASP.NET Core, .NET MAUI and Windows development. It is a Standard Term Support (STS) release with two years of support. According to the post, STS and Long Term Support (LTS) releases share the same quality and servicing policies and differ only in length of support. .NET 10 remains a supported LTS option.

The headline language change is C# 15, the default language version for projects targeting .NET 11. Union types let a value be one of a declared set of case types, with conversions from those types and exhaustiveness checking in switch expressions. The post's example declares public union ProductLookup(Product, ProductNotFound); so a lookup returns either a product or a not-found result, and a switch over it must handle both, with no need for object or an unrelated base class. C# 15 also adds closed hierarchies: a closed class limits direct derivation to its declaring assembly, which lets the compiler check patterns over the hierarchy. The post positions unions for combining existing types and closed hierarchies for models where you own the inheritance relationship. Smaller additions include collection expression arguments (for example, a HashSet built with the OrdinalIgnoreCase comparer from "Alice", "ALICE" and "Bob" holds 2 entries), extension indexers, and labeled break and continue. These do not require the preview language version; the separate memory safety work remains in preview. F# 11 improves compiler memory use, reduces allocations in FSharp.Core collection operations and adds ways to bound concurrent asynchronous work.

In the SDK, a Native AOT CLI host is now enabled by default, so commands such as help and version queries can run without starting the managed CLI; commands that need managed execution still use it. The MSBuild server stays warm between CLI invocations by default, and SDK installers on Linux and macOS are smaller through assembly deduplication. File-based apps can span source files with #:include, and solution filters can be created and edited from the CLI. dotnet watch adds Aspire app-host integration, crash recovery and device selection for mobile projects. For Microsoft.Testing.Platform users, dotnet test gains run-level timeouts, failure limits, clearer progress reporting and per-module results directories; the post warns these switches are not interchangeable with VSTest options. Container publishing adds reproducible image digests through SOURCE_DATE_EPOCH and skips redundant layer uploads when the target manifest already exists. NuGet gains a minimum package publication age setting, so teams can wait before newly published versions become eligible; the post calls it an additional policy control, not a replacement for vulnerability checks or dependency review.

On runtime and performance, the post points to Stephen Toub's Performance Improvements in .NET 11, a tour of hundreds of runtime and library optimizations with benchmarks and code examples. JIT improvements remove more redundant bounds checks and branches, improve devirtualization and fold more operations into constants. Native AOT interface dispatch uses a shared helper that cuts code at interface call sites and improves throughput for interface-heavy workloads. Hardware support grows with FP16 instructions for Half operations on supported x64 and Arm64 hardware and new vector APIs. In-process crash report logging, which captures a managed stack trace, module information and runtime state before a process exits, was previously on mobile platforms and now also supports Linux and macOS. Runtime Async moves asynchronous suspension and resumption into the runtime instead of compiler-generated state machines, giving profilers and debuggers a clearer live call stack. It remains a preview feature, enabled in a net11.0 project with the runtime-async=on feature flag and without EnablePreviewFeatures. The runtime libraries themselves are built with it, but opting application code in is a separate choice.

For AI work, the .NET 11 SDK includes an MCP server template built on the official MCP C# SDK, created with dotnet new mcpserver -o MyMcpServer, with a working sample tool. Microsoft.Extensions.AI (MEAI) supplies abstractions such as IChatClient and IEmbeddingGenerator, shipped as NuGet packages rather than tied to a framework version. Microsoft Agent Framework (MAF) builds on them with agents that call tools and keep conversation state, plus workflows; an agent can be exposed through an ASP.NET Core AG-UI endpoint, and that hosting integration is currently prerelease. Experimental Blazor AI components integrate with AG-UI. Agentic development tools include .NET Skills, .NET MAUI DevFlow for inspecting and testing running apps, and the .NET Upgrade canvas for reviewing modernization progress.

Elsewhere, ASP.NET Core adds asynchronous validation, OpenAPI 3.2 and new capabilities for Blazor and SignalR. .NET MAUI adopts CoreCLR as its default runtime and improves XAML iteration and native controls. The libraries add Zstandard compression to System.IO.Compression with span-based APIs and CRC32 validation when reading ZIP entries; an expanded Process API with one-shot run-and-capture methods; four in-memory stream adapters (ReadOnlyMemoryStream, WritableMemoryStream, ReadOnlySequenceStream and StringStream); System.Text.Json support for C# unions, F# discriminated unions and JSON Lines output from asynchronous sequences; and LINQ FullJoin, which keeps unmatched elements from both inputs. The F# union support in JSON uses reflection and does not support source generation, trimming or Native AOT. The post also begins an Entity Framework Core 11 section, which this retelling does not cover.

Key facts

  • .NET 11 is a Standard Term Support release with two years of support; .NET 10 remains a supported LTS option, and the post says STS and LTS differ only in length of support.
  • C# 15, the default for .NET 11 projects, adds union types with exhaustiveness checking in switch expressions, plus closed hierarchies that limit direct derivation to the declaring assembly.
  • The SDK enables a Native AOT CLI host and a warm MSBuild server by default, and the SDK includes an MCP server template (dotnet new mcpserver).
  • Libraries gain Zstandard compression, four in-memory stream adapters, an expanded Process API and LINQ FullJoin; .NET MAUI moves to CoreCLR as its default runtime.
  • Runtime Async stays in preview, enabled with the runtime-async=on flag; the AG-UI hosting integration is prerelease and the Blazor AI components are experimental.

Why it matters

This is the yearly release of Microsoft's main application platform, and the post pitches it on two fronts. For everyday code, C# 15 union types let a method's return type state which outcomes a caller must handle, with the compiler checking the switch. For tooling, a Native AOT CLI host and a warm MSBuild server aim to cut startup overhead in commands developers run constantly. The post also puts AI work inside the platform: an MCP server template in the SDK, the Microsoft.Extensions.AI abstractions and Microsoft Agent Framework for agents and workflows.

Who it affects

C# and F# developers, since C# 15 is the default language version for projects targeting .NET 11 and F# 11 ships alongside. Teams that run builds, tests and container publishing through the dotnet CLI are affected by the SDK changes. Web developers get asynchronous validation and OpenAPI 3.2 in ASP.NET Core, and mobile and desktop developers get .NET MAUI on CoreCLR. Developers building AI applications or agents are the audience for the MCP template, MEAI and MAF. Anyone choosing a release must decide between this two-year STS release and the still-supported .NET 10 LTS.

How to use it

To try union types, target .NET 11 and declare a union such as public union ProductLookup(Product, ProductNotFound);, then switch over the result. For an MCP server, run dotnet new mcpserver -o MyMcpServer; the template includes a working sample tool. To try Runtime Async in a project targeting net11.0, add runtime-async=on to the Features property; EnablePreviewFeatures is not needed. On the SDK side, the Native AOT CLI host and warm MSBuild server are on by default. NuGet's minimum package publication age setting lets a team wait before new package versions become eligible. For hands-on AI material the post points to .NET AI Essentials and a Microsoft Agent Framework walkthrough. The livestream keynote and session playlist from .NET Conf 2026 are linked in the post.

How solid is it

This is Microsoft's own release announcement on the .NET devblog, so the feature descriptions come straight from the team that built them. It is a marketing-flavoured overview that links out for full details rather than a spec. Performance claims are qualitative; the post gives no benchmark figures and defers to Stephen Toub's separate Performance Improvements in .NET 11 post, which it says contains benchmarks. This retelling covers the post up to the start of its Entity Framework Core 11 section; later material is not covered.

Risks and caveats

Several pieces are not final. Runtime Async remains a preview feature, and the post advises testing your application's dependencies and diagnostics before adopting it. The AG-UI hosting integration is prerelease and the Blazor AI components are experimental. The memory safety work in C# 15 remains in preview. F# union support in System.Text.Json relies on reflection and does not support source generation, trimming or Native AOT, so it may not suit trimmed apps. The dotnet test switches for Microsoft.Testing.Platform are not interchangeable with VSTest options. The NuGet publication age setting is an extra policy control, not a replacement for vulnerability checks or reviewing dependencies. On performance, the post itself says to measure the effect on your own application, since throughput, startup time, memory use and deployment size depend on workload and publishing options.

“STS and Long Term Support (LTS) releases have the same quality and servicing policies; the difference is the length of support.”

— Announcing .NET 11, .NET devblog