![]() |
|
[DevBlog MS] Announcing .NET 11 - Printable Version +- Sick Gaming (https://sickgaming.net) +-- Forum: Programming (https://sickgaming.net/forum-76.html) +--- Forum: C#, Visual Basic & .NET (https://sickgaming.net/forum-79.html) +--- Thread: [DevBlog MS] Announcing .NET 11 (/thread-114642.html) |
[DevBlog MS] Announcing .NET 11 - xSicKxBot - 11-10-2026 Today, we’re excited to announce the release of .NET 11! This year’s release makes building modern applications faster, more productive, and has improvements across C# 15, ASP.NET Core, .NET MAUI, and Windows development. With hundreds of runtime optimizations, more responsive SDK tooling, and less overhead in everyday commands, you can spend less time waiting and more time creating. Build richer web and cross-platform applications, take advantage of new C# language features, and explore AI-powered development with improved tools and agentic capabilities. Download .NET 11 .NET 11 support .NET 11 is a Standard Term Support (STS) release with two years of support under the .NET support policy. STS and Long Term Support (LTS) releases have the same quality and servicing policies; the difference is the length of support. .NET 10 remains a supported LTS option. Stay current with servicing updates whichever release you choose. Join us at .NET Conf, November 10-13 Explore .NET 11 with the product teams and community at .NET Conf 2026. The conference includes product team sessions on November 10 and 11, followed by two days of community sessions. Watch the , or browse the conference session playlist. Watch .NET Conf What’s new in .NET 11 Some of the changes we’re most excited for you to try:
The what’s new in .NET 11 overview links to the full details. Here are the changes behind those headlines and how to start using them. Languages C# 15 C# 15 is the default language version for projects targeting .NET 11. Union types are one of its biggest additions: a value can be one of a declared set of case types, with conversions from those types and exhaustiveness checking in switch expressions. Consider a product lookup that either finds a product or reports that it wasn’t found: Code: ProductLookup result = new Product(42, "Mechanical keyboard");
string message = result switch
{
Product product => $"Found {product.Name}",
ProductNotFound missing => $"No product with ID {missing.Id}",
};
Console.WriteLine(message);
public sealed record Product(int Id, string Name);
public sealed record ProductNotFound(int Id);
public union ProductLookup(Product, ProductNotFound);The result type tells a caller which outcomes it needs to handle. There’s no need to use Code: objectC# 15 also adds closed hierarchies. A Code: closedSmaller language features help with everyday code, too. Collection expression arguments let you pass constructor or factory arguments without giving up collection expression syntax: Code: HashSet<string> names =
[with(StringComparer.OrdinalIgnoreCase), "Alice", "ALICE", "Bob"];
Console.WriteLine(names.Count);This prints Code: 2Code: "Alice"Code: "ALICE"Other additions include extension indexers and labeled Code: breakCode: continueF# 11 F# 11 improves compiler memory use and reduces allocations in FSharp.Core collection operations. It also adds ways to bound concurrent asynchronous work, useful when a collection operation would otherwise start more work than a service or machine can handle comfortably. The F# release notes distinguish the default-language updates from preview capabilities, including Runtime Async support for custom computation-expression builders. Platform SDK The SDK now enables a Native AOT CLI host by default. Commands such as help and version queries can run without starting the managed CLI, and tool launches can avoid that startup path too. Commands that need managed execution still use it. The MSBuild server also stays warm between CLI invocations by default, reducing repeated startup work. SDK installers on Linux and macOS are smaller through assembly deduplication. File-based apps can grow across source files with Code: #:includeCode: dotnet watchFor teams using Microsoft.Testing.Platform, Code: dotnet testContainer publishing adds reproducible image digests through Code: SOURCE_DATE_EPOCHSee what’s new in the SDK and tooling for command examples and configuration. Runtime and performance Performance work in .NET 11 reaches both the code you deploy and the tools you use to develop it. Stephen Toub’s Performance Improvements in .NET 11 takes a detailed tour through hundreds of runtime and library optimizations, with benchmarks and code examples. The just-in-time (JIT) compiler improvements remove more redundant bounds checks and branches, improve devirtualization, and fold more operations into constants. For example, the JIT can optimize additional Code: SequenceEqualNative AOT interface dispatch uses a shared helper that reduces the code needed at interface call sites and improves throughput for interface-heavy workloads. Hardware support also expands, including FP16 instructions for Code: HalfThere’s useful work on diagnostics, too. In-process crash report logging can capture a managed stack trace, module information, and runtime state before a process exits. Previously available on mobile platforms, this reporting path now also supports Linux and macOS. As always, measure the effect on your own application. Throughput, startup time, memory use, and deployment size depend on the workload and publishing options you choose. Runtime Async has been a recurring theme throughout the .NET 11 previews. It moves asynchronous suspension and resumption into the runtime instead of relying on compiler-generated state machines. One especially useful result is a clearer live call stack. Profilers and debuggers can show the asynchronous methods themselves instead of the infrastructure used to execute them. This is a distinction from exception stack traces, which already hide much of that infrastructure. Runtime Async remains a preview feature. To try it in a project targeting Code: net11.0Code: <PropertyGroup>
<Features>runtime-async=on</Features>
</PropertyGroup>You don’t need to enable Code: EnablePreviewFeaturesAI libraries and tools The .NET 11 SDK includes an MCP server template. MCP gives AI applications a common way to discover and call tools and services. The template uses the official MCP C# SDK and includes a working sample tool, so you can start exposing your own functionality without first installing a separate template package: Code: dotnet new mcpserver -o MyMcpServerFor applications that consume AI services, Microsoft.Extensions.AI (MEAI) provides abstractions such as Code: IChatClientCode: IEmbeddingGeneratorMicrosoft Agent Framework (MAF) builds on these abstractions with agents that call tools and maintain conversation state, plus workflows that coordinate agents and application code. Connect agents to MCP tools to give them access to your application’s capabilities, and expose an agent through an ASP.NET Core AG-UI endpoint to build an interactive Blazor experience. The AG-UI hosting integration is currently prerelease. For hands-on examples, start with .NET AI Essentials: The Core Building Blocks Explained and continue with our Microsoft Agent Framework walkthrough. Libraries The .NET libraries add capabilities that previously required extra setup, intermediate buffers, or custom helpers. The Process API expansion includes one-shot methods to run a process and capture its output and exit status. More advanced APIs give you control over inherited handles, suspended starts, and process signaling. Build tools and developer utilities can spend less code on process plumbing while still inspecting how a child process finished. See Process API Improvements in .NET 11 for examples. Zstandard compression joins the existing compression formats in Code: System.IO.CompressionFour new in-memory stream adapters bridge existing data to APIs that accept a Code: StreamCode: ReadOnlyMemoryStreamCode: WritableMemoryStreamCode: ReadOnlySequenceStreamCode: StringStreamCode: ReadOnlySequence<byte>System.Text.Json adds support for C# unions, F# discriminated unions, and JSON Lines output from asynchronous sequences. F# union support uses reflection and doesn’t support source generation, trimming, or Native AOT, so check the documented limits before choosing it for a trimmed application. LINQ adds FullJoin, which preserves unmatched elements from both inputs. This is useful for reconciliation work, such as comparing two inventories where you need to see missing items on either side. The libraries also expand numeric types, DNS resolution, cryptography, and tracing configuration. The library overview covers the complete set of changes and marks APIs that remain experimental. Entity Framework Core 11 Entity Framework Core 11 improves how your model becomes a query and how that query becomes SQL. EF Core removes unnecessary joins in more reference-navigation and split-query scenarios, improves Code: GroupByCode: FullJoinComplex types and JSON columns can now be used on entities mapped with table-per-type or table-per-concrete-type inheritance. Other improvements include migrations tooling and additional provider-specific JSON capabilities. For SQL Server applications, EF Core adds support for vector indexes and approximate vector search. The SQL Server features and corresponding EF APIs are experimental. See the vector search documentation and limitations before evaluating them. EF Core 11 requires .NET 11. When upgrading, check your database provider’s compatibility and the EF Core 11 breaking changes as well as the runtime changes. Developer tools The new dotnetup toolchain manager lets you install and update .NET SDKs and runtimes in your user account. It’s currently in public preview and helps you manage side-by-side versions and keep up with servicing updates. .NET Skills gives coding agents task-specific guidance from the .NET team. Our .NET Skills introduction explains how to add these skills to your coding agent. The experimental .NET MAUI DevFlow toolkit exposes a running app’s visual tree, screenshots, and interaction tools, so an agent can inspect and test the UI rather than work only from source code. For modernization, the .NET Upgrade canvas gives you a visual view of a GitHub Copilot upgrade session. Review assessment findings and dependency compatibility, follow implementation tasks, and monitor failures and progress as the upgrade agent works. Our modernization walkthrough in the GitHub Copilot app covers the workflow from assessment through execution. Workloads Web: ASP.NET Core and Blazor Application types are most useful when the rest of the stack understands them. ASP.NET Core supports C# unions wherever it uses Code: System.Text.JsonCode: anyOfThis support applies to JSON bodies, not to route, query, header, or form binding. When multiple union cases have the same JSON shape, configure a classifier so deserialization can distinguish them. The ASP.NET Core union documentation explains those boundaries. Validation also becomes more practical for rules that need to do I/O. Asynchronous validation works with the new asynchronous DataAnnotations APIs, so a validator can await a database lookup or a remote call instead of blocking a thread. Minimal APIs and Blazor forms can use this support. OpenAPI 3.2 is now the default for generated documents. Among other improvements, it lets the document describe the per-event payload of a server-sent event stream. If a client generator or another part of your toolchain doesn’t yet support 3.2, you can explicitly select an earlier document version. For long-lived connections, SignalR authentication refresh lets a connection refresh authentication without reconnecting. Blazor Interactive Server components can receive the updated identity and react when claims change. Blazor adds capabilities for both statically rendered pages and interactive applications. The new CacheView component caches the rendered output of a component subtree during static server-side rendering. On a cache hit, Blazor replays the markup without creating those child components or running their lifecycle methods. That gives you a smaller unit of caching for expensive, mostly static sections of a page. Interactive Server apps can opt into automatic circuit pause when a browser tab becomes inactive. After a configurable delay, pausing frees the server memory and SignalR connection held by an inactive user. The feature requires an additional package and explicit configuration; upgrading doesn’t silently change your application’s circuit behavior. Forms gain client-side validation for static server rendering and asynchronous validation support. Code: QuickGridCode: VirtualizeBlazor also adds components for agentic user interfaces. The new Code: Microsoft.AspNetCore.Components.AICode: IChatClientThe Blazor AI components package is experimental and remains prerelease throughout .NET 11. It’s an opportunity to try the direction and give feedback, not a stable part of the ASP.NET Core shared framework. See the Blazor AI components documentation. The AG-UI .NET SDK introduction covers the protocol’s client and server APIs. Build Agentic UI with the new Blazor AI components puts them together in a working app. See what’s new in ASP.NET Core for the Blazor features, configuration examples, and compatibility details. Client: .NET MAUI .NET MAUI in .NET 11 makes CoreCLR the default runtime across its platforms. The move to CoreCLR brings mobile and desktop apps onto the same runtime foundation as other .NET workloads. On Apple platforms that don’t allow JIT compilation, the runtime uses precompiled code and the interpreter rather than generating native code at runtime. Native AOT is an opt-in publishing alternative; its Android support remains experimental. Review the platform-specific runtime guidance and test your app’s libraries when choosing a deployment model. The UI development loop gets attention, too:
These are meaningful runtime and handler changes, so exercise navigation, custom handlers, and trimmed publishing as part of your upgrade. The optional Code: Microsoft.Maui.Controls.Compatibility.NET MAUI follows its own support policy, separate from the .NET runtime’s STS and LTS lifecycle. Windows: WinUI, Windows Forms, and WPF For new Windows desktop apps, WinUI 3 is the recommended native UI framework, pairing C# and XAML with modern controls and the Fluent Design System. It’s delivered through the Windows App SDK, which also makes modern Windows APIs available to existing WPF and Windows Forms apps. To add UI tests, see UWP and WinUI 3 apps: UI testing with MSTest. Windows Forms in .NET 11 adds an opt-in modern visual styles mode that you can select at the application or control level. It also adds ways to react to system visual and accessibility settings, defer revealing a form until it’s ready, and suspend painting during bulk updates. These controls let you introduce refreshed rendering where it makes sense for your application instead of treating a framework upgrade as an automatic visual redesign. WPF updates focus on reliability, including fixes for Fluent window backdrops, window manager failures, and weak-event cleanup. Self-contained Windows publishing also includes a native dependency needed by apps that load mixed-mode WPF assemblies. Get started and plan your upgrade Install the .NET 11 SDK. Use a compatible, up-to-date Visual Studio 2026 installation, or Visual Studio Code with C# Dev Kit. To create and run a console app: Code: dotnet new console -n HelloDotnet11 -f net11.0
dotnet run --project HelloDotnet11You can replace the generated program with either of the C# examples above to try the new language features. For an existing application, plan the upgrade across your development and deployment environments:
Upgrading from .NET 8 or .NET 9 .NET 8 and .NET 9 reach end of support on November 10, 2026. Move to a supported release to continue receiving fixes. Choose .NET 11 for the latest capabilities, or .NET 10 if its LTS lifecycle fits your requirements better. See the .NET support policy for dates and servicing requirements. If you’re upgrading from a .NET 11 release candidate, update to the final SDK, runtime, and compatible package and workload versions rather than staying on a prerelease build. Thank you for building .NET with us .NET 11 is the work of over 7,000 contributors. Thank you to everyone who contributed code, tested previews, reported issues, and helped us make better design decisions throughout the year. Your feedback across the previews and release candidates helped shape what we’re shipping today. The .NET ecosystem continues to grow, with more than 589,000 unique packages on NuGet and over 1.1 trillion package downloads. ![]() Download .NET 11, try it with an application you know well, and join us at .NET Conf to learn directly from the people building it. Share your results and questions in the .NET GitHub discussions. The post Announcing .NET 11 appeared first on .NET Blog. |