.NET 11 shipped on November 10, 2026.
Claude Opus 5.5 was trained months before that.
So when you ask it to write .NET 11 code, it works from preview-era memory. Sometimes that memory is good enough. Sometimes Claude confidently tells you that an API doesn't exist, and writes a workaround for a problem that .NET 11 already solved.
I saw exactly that in my tests.
Microsoft publishes official skills for .NET, but their .NET 11 coverage is tiny right now. And a model trained on .NET 11 GA is months away.
So I didn't wait.
I built 4 Claude skills that teach Claude C# 15, ASP .NET Core 11 and EF Core 11. Every code sample inside them compiles on .NET 11 in Visual Studio, Rider and VS Code.
Today I want to share these skills with you.
And these skills work for every AI agent: Claude, Codex, Copilot, Cursor, whatever you use.
In this post, we will explore:
- Why Claude Writes .NET 10 Code for Your .NET 11 Project
- What Microsoft's Official Skills Cover
- Knowledge Skills vs Workflow Skills
- The 4 .NET 11 Skills I Built
- Inside the C# 15 Unions Skill
- Inside the ASP .NET Core 11 and EF Core 11 Skills
- Testing the Skills: Before and After
- How to Install the Skills
Let's dive in.
Why Claude Writes .NET 10 Code for Your .NET 11 Project
Every AI model has a knowledge cutoff. That's the date its training data stops.
.NET ships a new version every November. The previews start in February, and the API surface continues to change until the release candidates in the fall.
A model trained in the middle of that year sees some previews, misses others, and never sees the final release.
That leads to 3 kinds of problems (with all agents Claude, Codex, Copilot):
- Missing APIs. Claude doesn't know a method exists, so it writes 20 lines of workaround code.
- Outdated patterns. Claude reaches for the .NET 10 way of doing things, like adding an instrumentation package that .NET 11 no longer needs.
- Wrong details. Claude knows a feature but gets the edge cases wrong, like a pattern that doesn't compile or an attribute it has to suppress first.
Here's what Opus 5.5 said in one of my test runs, after searching the SDK on my machine:
text.NET 11 has LeftJoin/RightJoin but no FullJoin, so I'll build the full outer join as a LEFT JOIN Concat the unmatched shipments.
.NET 11 does have FullJoin.
EF Core 11 translates it to SQL FULL JOIN.
Claude looked in the wrong place and drew the wrong conclusion.
What Microsoft's Official Skills Cover
Microsoft publishes an official set of agent skills in the dotnet/skills repository. I wrote about them in my post on creating Claude skills for .NET apps.
There's even a dotnet11 plugin.
At the time of writing this article, it contains 2 skills:
process-api-net11: the newProcessAPIs, likeProcess.RunAndCaptureTextAsync.system-text-json-net11:JsonNamingPolicy.PascalCaseand the genericGetTypeInfomethods.
The dotnet-upgrade plugin also has a migrate-dotnet10-to-dotnet11 skill.
Its own description says it covers breaking changes "through Preview 3".
These skills are well written, and you should install them:
bash/plugin marketplace add dotnet/skills /plugin install dotnet11@dotnet-agent-skills /plugin install dotnet-upgrade@dotnet-agent-skills
But nothing official covers C# 15 union types, ASP .NET Core 11 or EF Core 11 yet. That's a big gap, because those are the parts of .NET 11 you'll use every day.
So I filled them in.
Knowledge Skills vs Workflow Skills
There are two types of skills: knowledge skills and workflow skills.
In one of my previous articles, I showed how to build workflow skills for Claude and other agents. They describe a flow: how to add a feature, where each file goes, which patterns your team uses.
The .NET 11 skills are knowledge skills. They describe facts that the model is missing.
A good knowledge skill has 4 parts:
- The facts: which APIs exist, how they're called, and what changed.
- The rules: how to use them correctly, and when not to.
- The gotchas: the mistakes models make, even when they know the feature.
- The guards: what does NOT exist yet, so Claude doesn't invent it.
Each skill also ships compiled code examples:
textcsharp-15-unions/ ├── SKILL.md (rules, gotchas, guards) ├── references/ │ ├── custom-unions.md (detailed docs loaded on demand) │ └── json-and-aspnetcore.md └── examples/ ├── PaymentMethod.cs (compiled on .NET 11) ├── ShippingRate.cs ├── ShipmentStatus.cs ├── Result.cs └── ...
You can download all the skills at the end of this article, but don't skip reading, because I explain a lot of important details.
Claude reads SKILL.md when a task matches the skill's description.
It opens references/ and examples/ only when it needs more detail.
The 4 .NET 11 Skills I Built
| Skill | What it teaches Claude |
|---|---|
csharp-15-unions | Union types, closed hierarchies, custom and non-boxing unions, union-aware Result<T> types, System.Text.Json, ASP .NET Core and EF Core usage |
csharp-15-features | Collection expression arguments, extension indexers, labeled break and continue, and what is NOT in C# 15 |
aspnetcore-11 | Async validation, validation localization, OpenAPI 3.2, native OpenTelemetry tracing, [ShortCircuit], Zstandard compression |
efcore-11 | FullJoin, MaxBy/MinBy, complex types, vector and full-text search, JSON functions, temporal tables, migrations tooling, breaking changes |
I didn't build skills for areas Microsoft already covers, like the Process API and System.Text.Json naming policies.
The skills point Claude to Microsoft's versions instead.
Inside the C# 15 Unions Skill
Union types are the biggest C# 15 feature, so this is the largest skill. I covered unions in depth in my union types article.
The frontmatter decides when Claude loads the skill:
markdown--- name: csharp-15-unions description: > Write correct C# 15 union types and closed hierarchies for .NET 11 projects: the `union` keyword, exhaustive pattern matching, null/default handling, union bodies, `closed` classes, custom `[Union]` types (non-boxing, class-based, union member providers), System.Text.Json and ASP .NET Core usage, EF Core mapping, and making an existing Result<T> type union-aware. USE FOR: "union type", "discriminated union", "closed hierarchy", "closed class", "one of several types", "exhaustive switch without default", "replace OneOf/ErrorOr", "result union", Result<T> pattern matching, in any project targeting net11.0 or later (LangVersion 15+). DO NOT USE FOR: projects targeting net10.0 or earlier (unions don't compile there), F# unions, TypeScript unions, or closed enums (not shipped in C# 15). ---
Unions need the .NET 11 runtime, so the DO NOT USE part keeps the skill silent in a .NET 10 project.
The body starts with a check that Claude runs before writing any code:
markdown## Check first 1. The project targets `net11.0` or later. C# 15 is the default language version for `net11.0`. No `<LangVersion>preview</LangVersion>` and no `<EnablePreviewFeatures>` are needed for unions. 2. If the project targets `net10.0` or earlier, do NOT write unions. Use a closed set of records with a `_ => throw` default arm, or ask the user to upgrade.
Then come the rules for declarations, pattern matching, union bodies and closed hierarchies.
The section I'm most proud of is the gotchas list. I found every item on it by compiling code on .NET 11 and watching it fail:
markdown## Gotchas Claude gets wrong - `x is MyUnion` where `x` is already `MyUnion` is `error CS8121`. Patterns test the CONTENTS. - Inside a union body, switch on `this`, not on `Value` (`Value switch` is not exhaustive: it's `object?`). - Don't generate OneOf/ErrorOr/FluentResults wrappers or marker interfaces for new code on net11.0. - Don't write `closed enum`. Closed enums are a proposal (csharplang #9011), NOT in C# 15. - Don't use F#/Rust syntax (`| Case of ...`, `enum Pet { Dog(..) }`). Only `union Name(T1, T2, ...)`. - Don't declare `UnionAttribute`/`IUnion` yourself. They ship in the .NET 11 runtime. - Generated unions box value-type cases (`int`, `decimal`, `Guid`): ~28 B per value. On hot paths, write a custom union with the non-boxing access pattern (see `references/custom-unions.md`).
In early previews, you had to declare UnionAttribute and IUnion yourself, because the runtime didn't have them yet.
A model trained on preview blog posts may add those declarations to your project, where they duplicate the real ones.
The skill also teaches Claude how to make an existing Result<T> type union-aware, instead of throwing it away:
csharp[Union] public readonly record struct Result<TValue> : Result<TValue>.IUnionMembers { // existing private constructors, IsSuccess, IsError, Errors, Value, implicit operators public interface IUnionMembers { static Result<TValue> Create(TValue value) => new(value); static Result<TValue> Create(List<Error> errors) => new(errors); object? Value { get; } } object? IUnionMembers.Value => IsError ? Errors : Value; }
A model trained on the previews can't know this pattern: union member providers barely existed back then.
Inside the ASP .NET Core 11 and EF Core 11 Skills
The framework skills follow the same structure: facts, rules, gotchas and compiled examples.
ASP .NET Core 11
The main topic is async validation.
ASP .NET Core 10 added built-in validation for Minimal APIs, but it was synchronous.
ASP .NET Core 11 adds AsyncValidationAttribute and IAsyncValidatableObject.
The skill shows the exact shape, including a detail that's easy to miss: the synchronous IsValid method is abstract too.
csharppublic sealed class UniqueOrderNumberAttribute : AsyncValidationAttribute { // The sync IsValid is abstract too. Throw when the attribute is async-only. protected override ValidationResult? IsValid(object? value, ValidationContext context) => throw new InvalidOperationException("Validate this attribute with IsValidAsync."); protected override async Task<ValidationResult?> IsValidAsync( object? value, ValidationContext context, CancellationToken cancellationToken) { var dbContext = context.GetRequiredService<AppDbContext>(); if (value is string number && await dbContext.Orders.AnyAsync(o => o.Number == number, cancellationToken)) { return new ValidationResult($"Order {number} already exists."); } return ValidationResult.Success; } }
It also covers OpenAPI 3.2, which is now the default, and native OpenTelemetry tracing:
markdown## Gotchas Claude gets wrong - Writing a sync `IsValid` that calls `.Result`/`.Wait()` on a DB query. Use `AsyncValidationAttribute`. - Expecting OpenAPI 3.0/3.1 output by default. It's 3.2 now. - Adding `AddAspNetCoreInstrumentation()` in new net11.0 projects. Use `AddSource("Microsoft.AspNetCore")`. - Installing `Microsoft.McpServer.ProjectTemplates`. The `mcpserver` template is bundled.
EF Core 11
The EF Core skill covers the new query operators, complex types, SQL Server 2025 features and the migrations tooling.
Its gotchas came straight from my build errors:
markdown- `VectorSearch`, `WithApproximate`, `HasVectorIndex` are experimental: the build FAILS with `EF9105` until you suppress it (`#pragma warning disable EF9105` or `<NoWarn>EF9105</NoWarn>`). `EF.Functions.JsonContains` fails with `EF9106`. Tell the user why you suppress them. - `FreeTextTable` / `ContainsTable` need explicit type arguments (`FreeTextTable<CatalogItem, int>(...)`) and return `FullTextSearchResult<TKey>` with `Key` and `Rank`, NOT the entity. Join back on the key. - TPT/TPC with an abstract base needs the concrete types in the model (`modelBuilder.Entity<Derived>()` or a `DbSet`). Otherwise: "cannot be instantiated because its corresponding CLR type is abstract".
The FreeTextTable gotcha is a good example of why I compile everything.
One of the code samples in the official EF Core 11 docs selects r.Value from the result.
On .NET 11 that doesn't compile: the result only has Key and Rank.
If I had copied the docs into the skill, I would have taught Claude a bug.
Testing the Skills: Before and After
Skills are only worth installing if they change the result. So I measured it.
The setup:
- The same starter project: an ASP .NET Core 11 Minimal API with EF Core 11, SQLite and 3 entities (Customer, Order, Shipment).
- 4 tasks, one per skill.
- Each task ran twice in a fresh copy of the project: once without skills, once with the 4 skills in
.claude/skills/. - Claude Code, model Opus 5.5, web search and web fetch disabled.
- After each run, I built the project on .NET 11 and reviewed the code.
And here are the results:
| Task | Without skills | With skills |
|---|---|---|
| C# 15 union type with exhaustive switch | Correct. 8 turns, 56 s, $0.16 | Correct. 10 turns, 29 s, $0.37 |
Labeled break/continue, with(...), extension indexer | Correct. 6 turns, 26 s, $0.15 | Correct. 7 turns, 21 s, $0.16 |
| Async validation + OpenTelemetry in ASP .NET Core 11 | Correct, after reverse-engineering the SDK. 56 turns, 9 min 7 s, $1.25 | Correct. 14 turns, 52 s, $0.35 |
| Full outer join, top customer, complex-type index in EF Core 11 | Builds, but no FullJoin and no MaxBy. 29 turns, 2 min 46 s, $0.59 | FullJoin + MaxByAsync. 13 turns, 1 min 13 s, $0.32 |
| Total | 99 turns, 13.2 min, $2.15 | 44 turns, 2.9 min, $1.20 |
All 8 projects built with 0 errors and 0 warnings. In every run with skills, Claude loaded the matching skill automatically.
The language tasks were a tie.
Opus 5.5 already knows C# 15 syntax from the previews.
Both versions wrote the same union PaymentMethod(CreditCard, PayPal, BankTransfer).
The skill even made the union task more expensive, because loading it costs tokens.
ASP .NET Core was 10x faster with the skill.
Without it, Claude ended up with the right APIs.
But to get there, it grepped XML documentation files in the SDK folder and ran strings on Microsoft.AspNetCore.Hosting.dll to find the OpenTelemetry attribute names.
That took 56 turns and over 9 minutes.
With the skill, it wrote the same code in 52 seconds.
EF Core was the real difference.
Without the skill, Claude concluded that FullJoin doesn't exist and built this:
csharp// Full outer join of orders and shipments on order id. LINQ has no FullJoin, so this is // orders LEFT JOIN shipments, UNION ALL shipments with no matching order - one SQL query. var ordersWithShipments = db.Orders.LeftJoin( db.Shipments, o => (int?)o.Id, s => s.OrderId, (o, s) => new ReconciliationRow { /* ... */ }); var shipmentsWithoutOrders = db.Shipments .Where(s => s.OrderId == null || !db.Orders.Any(o => o.Id == s.OrderId)) .Select(s => new ReconciliationRow { /* ... */ }); return await ordersWithShipments.Concat(shipmentsWithoutOrders).ToListAsync();
It works.
But it glues a left join and a NOT EXISTS subquery together with UNION ALL, and the comment teaches the next developer something false.
With the skill, Claude wrote:
csharpawait db.Orders .FullJoin( db.Shipments, order => (int?)order.Id, shipment => shipment.OrderId, (order, shipment) => new ReconciliationRow( order != null ? order.Id : null, order != null ? order.Number : null, shipment != null ? shipment.Id : null, shipment != null ? shipment.Number : null, shipment != null ? shipment.Carrier : null)) .ToListAsync(ct);
Same story for the top customer.
Without the skill: OrderByDescending(c => c.Orders.Count).ThenBy(c => c.Id).FirstOrDefaultAsync().
With the skill: MaxByAsync(c => c.Orders.Count(), ct).
Note: I ran each task once. AI output varies between runs, so treat these numbers as one honest sample, not a complete benchmark.
How to Install the Skills
You can download all 4 skills at the end of the article. Here is how to install them:
Claude Code
Unzip the skills into the .claude/skills/ folder of your repository:
textyour-repo/ └── .claude/ └── skills/ ├── csharp-15-unions/ ├── csharp-15-features/ ├── aspnetcore-11/ └── efcore-11/
Commit the folder, and your whole team gets the skills on the next git pull.
To use them in all your projects, put them in ~/.claude/skills/ instead.
Restart Claude Code (or the Desktop app) and run /skills to check that all 4 are loaded.
Other agents
The skills follow the open Agent Skills format, so Codex, GitHub Copilot and Cursor can use them too. Copy the folders into the skills directory your agent reads.
Install Microsoft's dotnet11 and dotnet-upgrade plugins alongside them.
The skills are designed to work together.
At some point, a new Claude model will be trained on .NET 11 GA.
Microsoft will also add more skills to the dotnet11 plugin.
When that happens, run the before/after test again. If Claude without the skills writes the same code, delete the skills.
AI models always lag behind the .NET release cycle (and not only .NET).
That's why I have created these skills to close that gap today so you don't have to wait for a few months.
Hope you find this newsletter useful. See you next time.

