.NET 11 Preview 7 Matures C# 15 Discriminated Unions, Turns On NativeAOT by Default
With GA slated for November, the second-to-last preview adds union patterns and exhaustiveness checking while flipping two major build defaults for cloud-native deployments.
Microsoft published ".NET 11 Preview 7 is now available!" on August 11, 2026, with general availability slated for November 10, alongside C# 15. Preview 7 is expected to be the last preview before two release candidates land in September and October.
The preview's biggest language-level news is continued work on C# 15's union keyword — discriminated (tagged) unions, first introduced in earlier previews. Preview 7 adds union patterns, letting code match on either the union itself or its underlying value, plus exhaustiveness checking for type parameters constrained to a closed union type. It's a feature C# developers have wanted for years, closing a real gap against F#'s and Rust's native sum types and reducing reliance on community workarounds like the OneOf library or ASP.NET Core's Results<> type.
Two build-system defaults flip in this release. NativeAOT is now on by default for the dotnet CLI, and MSBuild server is enabled by default — both changes aimed squarely at cloud-native deployment scenarios, where faster builds and smaller, faster-starting container images matter more than they do for a typical desktop app.
Async performance also keeps advancing under the "runtime-native async" effort: runtime-async tiering and tail-await optimizations mean async methods now compile through .NET's normal tiered-compilation pipeline instead of always starting out running as interpreted tier0 code, continuing to narrow the performance gap with the traditional compiler-generated async state machine.
A less headline-grabbing but notable milestone: .NET 11's effort to bring CoreCLR to WebAssembly via a portable interpreter-plus-ReadyToRun model reached a real checkpoint in Preview 7, running the full CoreCLR libraries test suite end-to-end on WASM for the first time.
That exhaustiveness checking is the part worth sitting with: a switch over a closed union type can now be verified complete at compile time, so adding a new case to the union later causes every switch that doesn't handle it to fail to build, instead of silently falling through at runtime. That's the specific guarantee OneOf and Results<> couldn't offer as library-level workarounds — real compiler enforcement, not a convention teams had to maintain by discipline.
Preview 7's full details, including migration notes for the union pattern syntax, are posted on the official .NET blog.
Source: Microsoft .NET Blog — .NET 11 Preview 7 is now available!
