.NET 11 was released this November at .NET Conf 2026. Like every year, there's a ton to unpack, so we'll stick to the things that caught our eye and that we think will matter most to your day-to-day work. Spoiler alert: last year we said, "one day we'll get discriminated unions, but not quite yet." Well... that day has come.
New version of C#
ASP.NET Core Improvements
EF Core Improvements
Performance
SDK and tooling updates
… and more!
.NET 11 is a Standard-Term Support (STS) version. Thanks to the change Microsoft announced last year, STS releases now get 24 months of support instead of 18, which puts .NET 11's end of support in November 2028, right alongside .NET 10 (LTS). That makes STS more approachable than it used to be. You can check the dates yourself here ->
https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core
One more important date while we're on the subject: .NET 8 and .NET 9 both reached end of support on November 10, 2026. If you still have apps on either of those versions, now is the time to get moving. More on that in our upgrade section at the end.
Another .NET release means another version of C#. Last year C# 14 gave us extension members, null-conditional assignment, and the field keyword. This year is a bigger one. C# 15 brings union types, closed hierarchies, collection expression arguments, extension indexers, labeled break and continue, and more! We'll touch on our favorites below.
We've been joking about this one for years, and it's finally here. The new union keyword lets you declare that a value is exactly one of a fixed set of types. The compiler gives you implicit conversions from each case type, and, best of all, it knows the complete set of cases, so your switch expressions are exhaustive. If you later add a new case to the union, you get compiler errors wherever you forgot to handle it, rather than a surprise at runtime.
Here's a quick example of modeling the result of saving a student record:
public record class Saved(int Id);
public record class ValidationFailed(string[] Errors);
public record class NotFound(int Id);
public union SaveResult(Saved, ValidationFailed, NotFound);
And consuming it:
SaveResult result = await studentService.SaveAsync(student);
string message = result switch
{
Saved s => $"Saved student {s.Id}",
ValidationFailed v => string.Join(", ", v.Errors),
NotFound n => $"Student {n.Id} not found",
};
No base class, no marker interface, no default case. To make it even sweeter, ASP.NET Core and System.Text.Json understand unions out of the box in .NET 11 (more on that below).
https://devblogs.microsoft.com/dotnet/csharp-15-union-types/
Closed hierarchies are the sibling feature to unions. Adding the closed modifier to a class makes it implicitly abstract and restricts its direct descendants to the same assembly. That means the compiler knows every subtype and can perform the same exhaustiveness checks it performs for unions. This is a great fit for things like the states of a background job or an order workflow.
public closed record class OrderStatus;
public record class Pending : OrderStatus;
public record class Shipped(string TrackingNumber) : OrderStatus;
public record class Cancelled(string Reason) : OrderStatus;
Collection expressions have been one of our favorite additions in recent versions, but you couldn't pass arguments to the underlying constructor. Want a case-insensitive HashSet? Back to the old syntax. C# 15 adds a with(...) element, written first, that forwards arguments to the constructor. The C# team has also said this lays the groundwork for dictionary expressions down the road, so keep an eye out for those.
said this lays the groundwork for dictionary expressions down the road, so keep an eye out for those.
// Before
var tags = new HashSet(StringComparer.OrdinalIgnoreCase) { "dotnet", "DOTNET" };
// After (C# 15)
HashSet tags = [with(StringComparer.OrdinalIgnoreCase), "dotnet", "DOTNET"];
Last year's extension blocks got a little more love. You can now declare indexers inside an extension block, so you can index into a type you don't own as if the indexer lived on the type itself.
public static class GarageExtensions
{
extension(Garage garage)
{
public Car this[int spot] => garage.GetCarInSpot(spot);
}
}
var car = garage[2];
If you've ever written a nested loop and needed to bail out of both levels, you know the drill: a found flag or extracting a method just to use return. With C# 15 you can label a loop and target it directly.
search: foreach (var warehouse in warehouses)
{
foreach (var bin in warehouse.Bins)
{
if (bin.Sku == sku && bin.Quantity > 0)
{
reserved = Reserve(bin);
break search;
}
}
}
Small, but it reads so much better than the flag-variable dance.
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/statements/jump-statements
The ASP.NET Core team didn't waste any time putting C# 15 unions to work. Unions are supported anywhere System.Text.Json is used: request and response bodies in Minimal APIs and MVC, SignalR, Blazor JS interop, and more. That means you can return our SaveResult union from earlier straight out of an endpoint.
app.MapPost("/students", async (Student student, StudentService service) =>
await service.SaveAsync(student)); // returns SaveResult
OpenAPI describes a union endpoint using an anyOf schema that lists each case type. One gotcha: unions aren't supported for route values, query strings, headers, or form fields, just bodies.
https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-11#c-union-types
Last year, we were excited that Minimal APIs got DataAnnotation validation with builder.Services.AddValidation();. This year it goes async. The base libraries add AsyncValidationAttribute and IAsyncValidatableObject, and Minimal APIs and Blazor forms run them end to end. Need to check that an email isn't already in the database before the request hits your endpoint? Now that's an attribute instead of a manual check in every handler.
public sealed class UniqueEmailAttribute : AsyncValidationAttribute
{
protected override ValidationResult? IsValid(object? value, ValidationContext context) =>
throw new InvalidOperationException("Use IsValidAsync.");
protected override async Task IsValidAsync(
object? value, ValidationContext context, CancellationToken cancellationToken)
{
var users = context.GetRequiredService();
return value is string email && await users.EmailExistsAsync(email, cancellationToken)
? new ValidationResult("That email is already registered.")
: ValidationResult.Success;
}
}
Validation messages are also localizable out of the box now. Just call AddLocalization() before AddValidation().
The OpenAPI train keeps rolling. .NET 9 dropped Swashbuckle, .NET 10 brought OpenAPI 3.1, and version 11 makes OpenAPI 3.2 the default. That comes with an upgrade to Microsoft.OpenApi 3.x, which has some breaking changes if you've written custom transformers. If your tooling isn't ready for 3.2 yet, you can still pin an earlier version. In my experience, you will need to do this if you do any integrations with postman today.
builder.Services.AddOpenApi(options =>
{
options.OpenApiVersion = Microsoft.OpenApi.OpenApiSpecVersion.OpenApi3_1;
});
https://github.com/microsoft/OpenAPI.NET/blob/main/docs/upgrade-guide-3.md
Short-circuit routing has been around since .NET 8 as a convention on Minimal APIs. Now there's an attribute you can use on MVC controllers too. This is perfect for things like health checks or robots.txt that don't need to run through auth, CORS, and the rest of your middleware pipeline.
app.MapGet("/health", [ShortCircuit] () => "Healthy");
Blazor gets another huge batch of updates this year. Here are the ones that caught our eye:
Client-side validation for static SSR forms. Static SSR forms with a DataAnnotationsValidator now validate instantly in the browser without a round trip to the server. It's on by default.
TempData and Session support in static SSR.
QuickGrid upgrades. Pagination and sorting can now live in the URL, so links are shareable, and the back button works. There's also a new OnRowClick event.
CacheView. Cache the rendered output of an expensive part of a page during static SSR.
Auto-pause for idle circuits. Server-side circuits can pause automatically when a user's tab has been hidden for a while, freeing up server memory.
Experimental AI components. A new Microsoft.AspNetCore.Components.AI package gives you building blocks for chat UIs, streaming responses, and human-approval flows for agent tool calls.
https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-11#blazor
EF Core 11 has a long list of new features, including vector search and full-text search improvements for SQL Server, and a lot of love for Cosmos DB. As usual, we'll focus on the cross-cutting features that most of our apps will feel.
This is our favorite kind of feature: the kind you get for free just by upgrading. When you Include a reference navigation alongside a collection, EF used to add joins and ORDER BY columns it didn't actually need. EF Core 11 prunes them. The EF team measured a 29% improvement in one common split-query scenario and 22% in a single-query scenario. Your mileage will vary, but that's a nice bump for zero code changes.
var students = context.Students
.Include(s => s.Advisor) // reference navigation
.Include(s => s.Courses) // collection navigation
.AsSplitQuery()
.ToList();
If you use value converters, you may have spotted EF generating SQL like CAST([s].[Name] AS nvarchar(max)) on a column that's already nvarchar(max). Besides being noisy, those casts can stop SQL Server from using your indexes. EF Core 11 now strips these no-op casts automatically. Another free one!
.NET 11 adds a FullJoin operator to LINQ (finally, no more union-of-two-left-joins gymnastics), and EF Core 11 translates it to a SQL FULL JOIN. EF also now translates MaxBy and MinBy, which we first covered back in our .NET 6 post. It took a while to see them in EF, but we are glad they are here. https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-11.0/whatsnew#better-sql-for-to-one-joins
var topStudent = await context.Students
.MaxByAsync(s => s.Courses.Count());
If you've ever had two developers create migrations on separate branches and only found out something was wrong after the merge, this one's for you. The model snapshot now records the ID of the latest migration. That means divergent branches cause a good old-fashioned merge conflict in source control, so your team finds out right away instead of at deploy time.
There are a few other nice CLI improvements too:
dotnet ef database update MyMigration --add creates and applies a migration in one step.
A .config/dotnet-ef.json file can hold your default --project and --startup-project values, so you can stop typing them on every command.
--context "*" runs commands like migrations list and database update against every DbContext in a project.
https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-11.0/whatsnew#migrations
UseSqlServer now defaults to compatibility level 160 (SQL Server 2022). That unlocks translations like LEAST and GREATEST by default, but if you're still running on an older SQL Server, you'll want to set the compatibility level explicitly before you upgrade.
https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-11.0/breaking-changes
As per usual, Stephen Toub has you covered with his annual deep dive into everything that got faster. Grab a coffee (or three) before you open it. The scroll bar is as tiny as ever => Performance Improvements in .NET 11 - .NET Blog
There's one runtime change this year that we think deserves its own spotlight, though.
Since async/await arrived back in C# 5, the compiler has turned every async method into a generated state machine. It works, but if you've ever looked at a stack trace or profiler output from an async-heavy app, you know the pain: your three meaningful methods are buried under a wall of AsyncMethodBuilderCore.Start and MoveNext frames.
.NET 11 moves that work into the runtime itself. Instead of the compiler generating state machines, the runtime tracks suspension and resumption natively. The result is cleaner live stack traces, breakpoints that bind correctly inside async methods, and fewer allocations. In Microsoft's own example, a three-method async call chain went from 13 stack frames down to 5.
The .NET libraries themselves are already compiled with Runtime Async, so you get some of the benefit just by upgrading. For your own code, it's still a preview feature you opt into in your .csproj:
runtime-async=on
One thing worth calling out: this improves live stack traces (debuggers, profilers, new StackTrace()). Exception stack traces already looked clean, so don't expect those to change. We'd recommend trying this in a test environment before flipping it on in production, but it's a really exciting foundational change.
https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-11/runtime#runtime-async
This one's technically a breaking change. .NET 11 raises the minimum x64 baseline from x86-64-v1 to x86-64-v2 (which adds SSE4.2 and POPCNT, among others). Any chip still supported by Intel or AMD is fine; the last ones that don't qualify went out of support around 2013. Still, if you've got a very old on-prem server tucked in a closet somewhere (you might have bigger fish to fry than upgrading to .NET 11 :D), check it before you upgrade, because .NET will refuse to start on it.
https://learn.microsoft.com/en-us/dotnet/core/compatibility/jit/11/minimum-hardware-requirements
Last year we got Visual Studio 2026 (and the "Spicy Red" theme). Along with it, Microsoft announced that Visual Studio is moving to a .NET-style cadence: monthly feature updates on the Stable channel, plus a new yearly version each November that upgrades in place. If that plan holds, the next annual version should land right alongside .NET 11, and companies that need a frozen feature set can hop onto an LTSC channel instead. In the meantime, .NET 11 has been supported in Visual Studio 2026 Insiders throughout the release candidates, and VS Code with C# Dev Kit works great too.
Update | Version | Highlights |
18.11 | Hot Exit, stop build on first failure, compare commit to working tree, new Copilot chat (opt-in) | |
September | 18.10 | BYOK (preview), Agent (Preview) on Copilot SDK, condition highlighting, Podman attach |
August | 18.9 | Thinking-effort control, Git worktrees and submodules, org-level custom agents |
July | 18.8 | Built-in .NET and Azure skills, Review Selection, org-level custom instructions |
18.7 | Token-based usage tracking, MCP trust validation, whole-file next edit suggestions, in-IDE PR review | |
18.6 | Plan agent, Skills panel, multi-file summary diff, MSVC Build Tools 14.51 | |
18.4 | Custom agents and skills, find_symbol, MCP allowlists, perf tips while debugging | |
18.3 | @Test generation, Analyze Call Stack, Profiler agent, faster Razor Hot Reload |
Version dates are in the release history, and details are in the release notes.
The dotnet CLI gets a lot of quality-of-life love in .NET 11. Here are the ones we're most excited about.
The dotnet CLI itself is now compiled with NativeAOT, and the MSBuild server is on by default. Commands like --help skip the managed startup entirely. It's one of those changes you won't think about, but you'll feel it every time you run a command.
Last year, we were excited about running a single .cs file with dotnet run helloworld.cs. In .NET 11, file-based apps can use #:include to pull in other C# files, so your little script can grow into a few files without needing a .csproj. They also support dotnet format, NativeAOT build reuse, and dotnet user-jwts for testing authenticated endpoints.
#:package Humanizer@2.14.1
#:include Helpers.cs
Console.WriteLine(Helpers.Greeting().Humanize());
There's also a handy new dotnet run -e option for passing environment variables from the command line.
dotnet test gets a long list of upgrades: live display of in-flight tests, a run-level --timeout, --maximum-failed-tests to bail early, and built-in test templates that support xUnit v3 and NUnit on Microsoft.Testing.Platform. These are great for keeping CI pipelines fast and readable.
With supply chain attacks becoming more common, this one is a welcome addition. The new --min-publish-age-hours option on NuGet sources lets you set a minimum age before a newly published package version can be restored. A freshly compromised package often gets caught and pulled within a day or two, so a short cooldown is a cheap way to stay out of the blast radius.
We were big fans of .slnx last year. This year, dotnet sln can create and edit solution filters (.slnf), which is super handy for big solutions where you only want to load a handful of projects.
https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-11/sdk
Just like last year, the scope of breaking changes in .NET 11 is pretty small, and most upgrade pain will probably still come from NuGet dependencies. That said, here are the ones we'd keep an eye on, most of which we've already flagged above:
Minimum hardware.
OpenAPI. OpenAPI 3.2 is the default.
EF Core SQL Server compatibility level. It now defaults to 160 (SQL Server 2022).
New C# keywords. C# 15 introduces new modifiers like union and closed.
If you want to dig in further, check out the full list:
https://learn.microsoft.com/en-us/dotnet/core/compatibility/11
There's way more in .NET 11 than we could fit in one post.
Check out What's new in .NET 11 | Microsoft Learn if you want to keep digging, and catch the sessions from .NET Conf 2026!
If you're on .NET 8 or .NET 9: yes, and soon. Both reached end of support on November 10, 2026, which means no more security patches. You've got two good options. .NET 10 is the LTS release and is supported until November 2028. .NET 11 is STS, but thanks to the new 24-month STS window, it's also supported until November 2028. Since the support dates align, the question really comes down to whether you want the latest features.
If you're already on .NET 10, there's no rush, but there are some compelling reasons to make the jump. Unions alone are a big quality-of-life win, and you'll pick up free performance improvements in the runtime and EF Core along the way. And as always, staying current makes the next upgrade smaller. The one thing to keep in mind is that .NET 12 (LTS) will arrive next November, so plan your roadmap accordingly.
Either way, .NET 11 is the best version of .NET yet. If you need help upgrading your .NET projects, whether that's hopping off .NET 8 before the deadline or modernizing something even older, let us know! We've seen many successful .NET upgrades and would be happy to help.