Skip to content
Back to skills

Net11 Features

ASecurity

.NET 11 / C# 15 / ASP.NET Core 11 / EF Core 11 — what is new, what is still preview, and the upgrade gotchas from .NET 10. Covers union types, `with(...)` collection arguments, labeled break/continue, extension indexers, EF Core 11 breaking changes and the OpenAPI 3.2 default.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 1, 2026
ai-agentstypescriptrustgoc#sqlreactexpressdockerapidatabase

Works with

  • cli
  • api

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add zdanovichnick/dotnet-pilot --skill net11-features --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Net11 Features?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Net11 Features
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/zdanovichnick-net11-features/badge)](https://www.skillsdirectory.com/skills/zdanovichnick-net11-features)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: net11-features
description: .NET 11 / C# 15 / ASP.NET Core 11 / EF Core 11 — what is new, what is still preview, and the upgrade gotchas from .NET 10. Covers union types, `with(...)` collection arguments, labeled break/continue, extension indexers, EF Core 11 breaking changes and the OpenAPI 3.2 default.
when_to_use: The solution targets or is moving to net11.0; before using a C# 15 feature, an EF Core 11 or ASP.NET Core 11 API; when planning or reviewing a .NET 10 to .NET 11 upgrade; when a build on net11.0 behaves differently from net10.0.
---

# .NET 11 (C# 15)

.NET 11 shipped 2026-11-10 as an **STS** release (two years of support). .NET 10 is still the
LTS. Do not retarget a solution for the sake of it: `net10.0` stays correct until the user or the
team chooses `net11.0`.

## Check before you write

.NET 11 is newer than most model training data. Before using a .NET 11 API or C# 15 syntax:

1. Read the target: `<TargetFramework>` in the `.csproj`, `global.json`, `dotnet --version`. Installing
   the SDK alone does not retarget anything.
2. Confirm the API against current docs (Microsoft Learn, or Context7 when it is connected) rather
   than recalling a signature. A member that was in a preview may have changed by GA.
3. A feature this file marks **preview** or **experimental** needs the user's say-so in production code.

## C# 15

C# 15 is the default language version for `net11.0`. Only the updated memory-safety rules need
`<LangVersion>preview</LangVersion>` (plus the `updated-memory-safety-rules` feature flag); leave
them out of production code.

```csharp
public union Pet(Cat, Dog, Bird);                              // union type
List<string> names = [with(capacity: values.Length * 2), .. values];   // collection expression arguments
outer: foreach (var row in rows) { foreach (var c in row) { if (c is null) continue outer; } }  // labeled jump
extension(IEnumerable<int> sequence) { public int this[int index] => sequence.ElementAt(index); } // extension indexer
```

- **Union types.** Case types need no common base; each converts implicitly to the union, and a
  `switch` over the union is exhaustive without a discard arm. This repo's house type for expected
  failures stays `Result<TValue, TError>` (`skills/error-handling`); introduce a union into an error
  flow only by a team decision, because it changes every caller.
- **`with(...)` arguments** must be the **first** element. They are not supported for arrays or span
  types, and an argument cannot be `dynamic`. The `modern-csharp` rule that `[..a, ..b]` allocates
  still holds.
- **Closed hierarchies** are part of C# 15 as well. Read the language reference for the current
  syntax before writing one; do not infer it from `sealed` or `abstract`.
- **Labeled `break` / `continue`** replace a Boolean flag or a `goto`. Analyzer `IDE0410` flags the
  patterns they can replace.
- **Extension indexers** extend the C# 14 `extension(...)` block from `modern-csharp`.
- **The Roslyn server and C# 15.** `dnp-roslyn` older than 0.6.0 reads a `union` declaration as
  invalid code, so symbol and reference lookups miss it. Check with `dnp-roslyn version` and
  update the tool before trusting an empty result on a file that declares a union. `with(...)`
  arguments and labeled jumps were not probed; treat an empty result near them the same way.

## Runtime and SDK

- **Runtime Async** is a preview feature (`<Features>runtime-async=on</Features>`). Not for
  production code.
- **Minimum CPU requirements rose** on x86/x64 and Arm64. Check the target hosts and container base
  images before deploying a `net11.0` build to old hardware.
- The **Native AOT CLI host** is on by default, so `dotnet --help` and version queries skip the
  managed CLI. A script that wraps the CLI should still pass on both.
- `dotnet test` gains `--timeout` and `--maximum-failed-tests`; `dotnet run -e NAME=value` passes
  environment variables.

## Libraries

- **System.Text.Json** serializes C# unions. ASP.NET Core uses that anywhere it reads or writes
  JSON, including minimal API and MVC bodies.
- **LINQ `FullJoin`** keeps unmatched elements from both sides. EF Core 11 translates it to
  `FULL JOIN`, and adds `MaxBy` / `MinBy` translation.
- **Zstandard** moved into `System.IO.Compression`; ZIP reads validate CRC32.
- **`Decimal32` / `Decimal64` / `Decimal128`** are new IEEE 754 decimal types. Conversions between
  decimal and binary floating-point round the exact source value once, which can change a result
  that a .NET 10 conversion produced. Re-run numeric tests.
- Process APIs gained `Process.Signal(PosixSignal)` and an exit-status type. When the
  `dotnet11:process-api-net11` skill is installed, prefer it for process work.

## ASP.NET Core 11

- **OpenAPI documents default to 3.2.** This is a breaking change for anything that reads the
  document: confirm the TypeScript generator in `skills/api-contract` accepts 3.2 before upgrading
  a solution that has a React client.
- Minimal API endpoint filters now run even when parameter binding fails. A filter that assumed
  bound arguments exist needs a guard.
- Async validation is available for minimal APIs and Blazor forms.
- Response compression and request decompression gain Zstandard.
- Blazor AI components and QuickGrid `AnchorMode` / `ItemComparer` are experimental; QuickGrid
  needs an opt-in for analyzer `ASP0030`.

## EF Core 11

EF Core 11 requires the .NET 11 SDK and runtime and does not run on earlier .NET. A solution that
multi-targets `net10.0;net11.0` cannot reference EF Core 11 from the `net10.0` leg.

- `UseSqlServer` defaults to **compatibility level 160**.
- Vector properties are **not loaded by default**. SQL Server vector search and vector indexes are
  experimental.
- `Migrate()` / `MigrateAsync()` with **no migrations** now throws by default.
- The `dotnet ef` CLI writes its logs to **stderr**. A script that parsed log text from stdout
  breaks silently.
- Analyzer warning when `ToAsyncEnumerable` is used on an EF query; use `AsAsyncEnumerable`.
  A code fix is provided.
- Complex types and JSON columns now work with TPT and TPC inheritance.
- New CLI options: `database update --add`, `migrations remove --offline`, `--context "*"` for all
  contexts, and a `.config/dotnet-ef.json` file. Keep `--context <Name>` on every command when the
  solution has more than one `DbContext` and the command must touch one.
- Cosmos provider: the `__jObject` shadow property is gone, unmapped properties are no longer
  preserved, and projections containing undefined values throw `InvalidOperationException`.

## Upgrade checklist (net10.0 to net11.0)

1. `<TargetFramework>` and `<TargetFrameworks>` in every project, or one `Directory.Build.props`.
2. `global.json` SDK pin, CI images, Dockerfile base images.
3. `Microsoft.*` and `Microsoft.EntityFrameworkCore.*` versions in `Directory.Packages.props`
   (`dnp-nuget-auditor` checks consistency); the `dotnet-ef` tool version.
4. `dotnet build` with warnings visible, then `dotnet test`. New analyzer warnings are information,
   not noise.
5. Re-run the OpenAPI export and the client generator; diff the generated types.
6. A new migration only through `dotnet ef migrations add`; do not hand-edit the snapshot.

## Verified against

Microsoft Learn: What's new in C# 15, What's new in EF Core 11, What's new in ASP.NET Core in
.NET 11, What's new in .NET 11; the .NET 11 announcement (2026-11-10). Checked 2026-12-01. The
ASP.NET Core 11 page was only partly read, so an item above that is not on the official page for
your build is a reason to check, not to trust this file.

## See Also
- `skills/modern-csharp/SKILL.md` — C# 12–14, which C# 15 builds on
- `skills/api-contract/SKILL.md` — the OpenAPI 3.2 default lands here
- `skills/ef-core-patterns/SKILL.md` — migrations rules that still apply
- `knowledge/breaking-changes.md` — one-line summary per release

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.