Skip to content

Add migrate-dotnet10-to-dotnet11 skill#181

Open
danmoseley wants to merge 9 commits intodotnet:mainfrom
danmoseley:migrate-dotnet10-to-dotnet11
Open

Add migrate-dotnet10-to-dotnet11 skill#181
danmoseley wants to merge 9 commits intodotnet:mainfrom
danmoseley:migrate-dotnet10-to-dotnet11

Conversation

@danmoseley
Copy link
Member

@danmoseley danmoseley commented Mar 4, 2026

Recreated from #153 (original PR was orphaned when the fork relationship with dotnet/skills was re-established).

Adds a new migration skill that guides upgrading .NET 10 projects to .NET 11, covering TFM updates, NuGet package upgrades, and source-breaking changes documented so far in .NET 11 Preview 1.

Sources

  1. Overview of all breaking changes in .NET 11 — https://learn.microsoft.com/en-us/dotnet/core/compatibility/11
  2. Entity Framework Core breaking changes in .NET 11 — https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-11.0/breaking-changes
  3. C# 15 compiler breaking changes — https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/breaking-changes/compiler%20breaking%20changes%20-%20dotnet%2011

ASP.NET Core and WinForms breaking changes pages do not yet exist for .NET 11.

Skill coverage

The skill follows a structured 6-step workflow: assess → update TFMs/packages → fix source-incompatible changes → check behavioral changes → update infrastructure → verify. It references 6 conditional reference files loaded based on project type:

  • Core librariesNamedPipeClientStream constructor removal (SYSLIB0063), ZLibStream/GZipStream/DeflateStream behavioral changes, Utf8JsonWriter.WriteRawValue validation, TAR entry name changes
  • C# 15 compiler (Roslyn)Span<T> safe-context rules, ref readonly InAttribute changes, nameof(this.Member) semantics, with expression parsing, dynamic &&/&#124;&#124; operator resolution
  • EF Core 11 — Cosmos DB synchronous I/O fully removed
  • Cryptography — DSA removed from macOS
  • Runtime/JIT — Hardware baseline requirements (x86-64-v2, Arm64 LSE/AES)
  • SDK/MSBuild — Mono launch target removed

Eval suite

7 scenarios in eval.yaml testing compression/TAR changes, C# 15 compiler breaks, EF Core Cosmos migration, hardware requirements, DSA macOS, TFM updates, and dynamic operator resolution.

Status

This is an early skill covering .NET 11 Preview 1 only. Reference files will be expanded as Previews 2–7 ship and more breaking changes are documented.

Files added (9 files, ~800 lines)

  • plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/SKILL.md
  • plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/references/ (6 reference files)
  • tests/dotnet/migrate-dotnet10-to-dotnet11/eval.yaml
  • .github/CODEOWNERS (updated)

danmoseley and others added 6 commits February 27, 2026 18:05
Adds a new migration skill that guides upgrading .NET 10 projects to .NET 11,
covering TFM updates, NuGet package upgrades, and breaking changes across
the .NET 11 Preview 1 surface area.

Sources:
- https://learn.microsoft.com/en-us/dotnet/core/compatibility/11
- https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-11.0/breaking-changes
- https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/breaking-changes/compiler%20breaking%20changes%20-%20dotnet%2011
- https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-11/overview

Skill coverage:
- C# 15 compiler: Span safe-context, ref readonly InAttribute, nameof(this.),
  with() parsing, dynamic &&/|| with interfaces
- Core libraries: DeflateStream/GZipStream empty payloads, MemoryStream capacity,
  TAR checksum validation, ZipArchive.CreateAsync eager loading,
  Environment.TickCount consistency
- EF Core 11: Cosmos DB sync I/O fully removed
- Cryptography: DSA removed from macOS
- Runtime/JIT: x86-64-v2 minimum, Arm64 LSE requirement on Windows
- SDK: Mono launch target removed for .NET Framework apps

6 reference files loaded based on project type + 7 eval scenarios.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add documentation for the NamedPipeClientStream constructor obsoletion
(SYSLIB0063) which was merged in dotnet/runtime#120328 for .NET 11 but
not yet documented on learn.microsoft.com. The isConnected parameter
overload is obsoleted, and projects with TreatWarningsAsErrors will
fail to build.

Changes:
- core-libraries.md: Add Obsoleted APIs section with SYSLIB0063
- SKILL.md: Add to description, Step 1 assessment, Step 3 patterns

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add explicit migration framing to skill description to differentiate
  from csharp-scripts skill (SDK was routing to wrong skill)
- Add 'Use the migrate-dotnet10-to-dotnet11 skill' to eval prompts,
  matching real-world usage where users explicitly invoke migration skills

Eval results (3 runs each, explicit skill invocation):

  Haiku:  6/7 activated, best +1.3 (compression/TAR scenario)
  Sonnet: 7/7 activated, best +0.3 (EF Core, TFM update scenarios)

Skill activates reliably now. Quality gains are modest because the
skill covers only Preview 1 breaking changes (training data already
includes MS Learn docs). Expect larger gains as content grows with
later previews.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…csharp-compiler.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Separate the breaking and fixed code into distinct blocks to avoid
ambiguity about which line to use vs remove.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@danmoseley danmoseley requested a review from timheuer as a code owner March 4, 2026 02:04
Copilot AI review requested due to automatic review settings March 4, 2026 02:04
@danmoseley danmoseley requested a review from dbreshears as a code owner March 4, 2026 02:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new .NET migration skill package to the dotnet plugin, including reference material and an eval suite to validate the skill’s guidance for .NET 10 → .NET 11 upgrades.

Changes:

  • Added migrate-dotnet10-to-dotnet11 skill with a structured workflow and conditional reference loading.
  • Added 6 reference documents covering core libraries, C# compiler, EF Core, crypto, runtime/JIT, and SDK/MSBuild breaking changes.
  • Added a 7-scenario eval suite and updated CODEOWNERS for the new skill/test directories.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/SKILL.md New migration skill definition and step-by-step workflow guidance.
plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/references/core-libraries.md Core library breaking changes reference used by the skill.
plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/references/csharp-compiler.md C# 15 / Roslyn breaking changes reference used by the skill.
plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/references/efcore.md EF Core 11 breaking changes reference (Cosmos sync I/O removal).
plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/references/cryptography.md Crypto breaking changes reference (DSA removal on macOS).
plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/references/runtime-jit.md Runtime/JIT breaking changes reference (hardware baseline, globalization).
plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/references/sdk-msbuild.md SDK/MSBuild breaking changes reference (Mono launch target behavior).
tests/dotnet/migrate-dotnet10-to-dotnet11/eval.yaml New eval scenarios asserting the skill covers key migration breaks and fixes.
.github/CODEOWNERS Assigns ownership for the new skill and test directories.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ViktorHofer
Copy link
Member

/evaluate

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Skill Validation Results

Skill Scenario Baseline With Skill Δ Skills Loaded Overfit Verdict
migrate-dotnet10-to-dotnet11 Console app with compression and TAR operations 2.7/5 1.0/5 -1.7 ✅ tools: skill ✅ 0.04
migrate-dotnet10-to-dotnet11 C# 15 compiler breaking changes — Span safe-context, nameof, with() 3.3/5 2.3/5 -1.0 ✅ tools: skill ✅ 0.04
migrate-dotnet10-to-dotnet11 EF Core app with Cosmos DB provider using sync APIs 4.0/5 4.0/5 0.0 ✅ tools: skill ✅ 0.04
migrate-dotnet10-to-dotnet11 Deployment to older hardware with minimum requirement changes 3.0/5 3.0/5 0.0 ✅ tools: skill ✅ 0.04
migrate-dotnet10-to-dotnet11 Cryptography app using DSA on macOS 4.0/5 3.7/5 -0.3 ✅ tools: skill ✅ 0.04
migrate-dotnet10-to-dotnet11 Basic TFM update with Docker and global.json 4.3/5 4.0/5 -0.3 ✅ tools: skill ✅ 0.04
migrate-dotnet10-to-dotnet11 C# 15 dynamic operator and ref readonly delegate issues 4.0/5 2.0/5 -2.0 ✅ tools: skill ✅ 0.04

Model: claude-opus-4.6 | Judge: claude-opus-4.6

Full results

- SKILL.md: Show global.json as a diff edit preserving existing keys
  (rollForward, other settings) instead of replacing the entire file
- csharp-compiler.md: Fix ref readonly lambda example to use a static
  field instead of a captured local (which won't compile in a lambda)
- csharp-compiler.md: Declare missing local variable x in ref readonly
  local function example
- eval.yaml: Fix ref readonly lambda snippet to use a class with a
  static field, matching the reference file fix

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@danmoseley
Copy link
Member Author

Local Eval Results (post review-feedback fixes)

3 iterations (the CI run posted above used 1 iteration), claude-opus-4.6 model & judge, run locally.

Scenario Baseline With Skill Δ Overfit Verdict
Console app with compression and TAR operations ⏰ 2.0/5 1.0/5 -1.0 ✅ 0.06
C# 15 compiler breaking changes — Span safe-context, nameof, with() 2.7/5 2.7/5 0.0 ✅ 0.06
EF Core app with Cosmos DB provider using sync APIs 3.0/5 3.3/5 +0.3 ✅ 0.06
Deployment to older hardware with minimum requirement changes 2.7/5 3.0/5 +0.3 ✅ 0.06
Cryptography app using DSA on macOS ⏰ 2.0/5 3.0/5 +1.0 ✅ 0.06
Basic TFM update with Docker and global.json 3.3/5 4.0/5 +0.7 ✅ 0.06
C# 15 dynamic operator and ref readonly delegate issues ⏰ 2.0/5 1.7/5 -0.3 ✅ 0.06

Overall: ✅ passed (22.4% improvement, threshold 10%). Skill activated in all 7 scenarios. No overfitting detected.

⏰ = baseline run(s) hit timeout (agent spent time searching for non-existent skill file in empty workspace).

@ViktorHofer
Copy link
Member

the CI run posted above used 1 iteration

3

Copy link
Member

@AndriySvyryd AndriySvyryd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed EF Core content

danmoseley and others added 2 commits March 4, 2026 18:30
…Core

- Add @ViktorHofer as second owner for migrate-dotnet10-to-dotnet11 and
  migrate-nullable-references paths per CONTRIBUTING.md requirements
- Add Preview 1 annotation to EF Core reference file per reviewer feedback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename e.g. efcore.md to efcore-dotnet10to11.md so names won't collide
with reference files from other version migration skills. Update all
paths in SKILL.md to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ViktorHofer
Copy link
Member

/evaluate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants