Skip to content

Add migrate-dotnet10-to-dotnet11 skill#153

Closed
danmoseley wants to merge 6 commits intodotnet:mainfrom
danmoseley:migrate-dotnet10-to-dotnet11
Closed

Add migrate-dotnet10-to-dotnet11 skill#153
danmoseley wants to merge 6 commits intodotnet:mainfrom
danmoseley:migrate-dotnet10-to-dotnet11

Conversation

@danmoseley
Copy link
Member

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 3 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>
Copilot AI review requested due to automatic review settings February 28, 2026 03:53
@danmoseley
Copy link
Member Author

Did some eval testing and this seems limited value over no-skill in part because there are relatively few breaking changes; the agent can search the web by itself without this skill. In later previews we may be able to add more nuances here and make it useful. Opening the PR as a placeholder for now.

@danmoseley
Copy link
Member Author

fyi @mcastro-x

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 dotnet migration skill (migrate-dotnet10-to-dotnet11) to guide upgrading projects from .NET 10 to .NET 11, backed by scoped reference docs and an eval suite to validate coverage.

Changes:

  • Added migrate-dotnet10-to-dotnet11 skill with a structured migration workflow.
  • Added 6 technology-area reference documents (core libraries, C# compiler, EF Core, crypto, runtime/JIT, SDK/MSBuild).
  • Added a 7-scenario eval.yaml test suite plus CODEOWNERS entries for the new skill/tests.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 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.
plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/references/core-libraries.md Reference notes for core library breaking/behavioral changes.
plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/references/csharp-compiler.md Reference notes for C# 15/Roslyn breaking changes.
plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/references/efcore.md Reference notes for EF Core 11 (Cosmos sync I/O removal).
plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/references/cryptography.md Reference notes for crypto breaking changes (DSA on macOS).
plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/references/runtime-jit.md Reference notes for runtime/JIT changes (hardware baseline, etc.).
plugins/dotnet/skills/migrate-dotnet10-to-dotnet11/references/sdk-msbuild.md Reference notes for SDK/MSBuild behavioral change.
tests/dotnet/migrate-dotnet10-to-dotnet11/eval.yaml Eval scenarios validating the skill’s guidance across the covered areas.
.github/CODEOWNERS Assigns ownership for the new skill and its tests.

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

…csharp-compiler.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@danmoseley
Copy link
Member Author

Validated against PowerShell/PowerShell

Tested the skill by checking out PowerShell/PowerShell at commit 1965e059 (pre-.NET 11 upgrade) and following the skill workflow to migrate from .NET 10 to .NET 11 Preview 1. Compared results against the human-authored gold commit 212c5f97 (32 files, 71 insertions, 67 deletions).

Gold commit breakdown

Category Files Skill coverage
TFM updates (net10.0 -> net11.0) ~11 ✅ Step 2
Package version bumps (17 packages) ~8 ✅ Step 2
global.json SDK pin 1 ✅ Step 5
SYSLIB0063: NamedPipeClientStream isConnected obsoletion 1 ✅ Step 3 pattern #7
Span collection expression safe-context (#if UNIX only) 1 ✅ Step 3 pattern #1
Build scripts / CI (net10.0 string replacements) ~8 ⚠️ Partial
BOM/manifest (runtime-specific packaging) 1 ❌ Not applicable
Docs 1 ⚠️ Partial

Live test results

  1. Updated global.json, TFMs, and net10.0 references across 20 files
  2. Built using PowerShell's own build system (Start-PSBuild)
  3. One build error: SYSLIB0063 on RemoteSessionNamedPipe.cs:1302 -- skill pattern Skill idea: Source Generator / Analyzer Authoring #7 guided the fix (remove isConnected parameter)
  4. Rebuild: success
  5. The Span collection expression issue (src/powershell/Program.cs) is inside #if UNIX so didn't trigger on Windows. On cross-platform CI it would surface, and skill pattern Initial documentation and validation workflow #1 covers the exact fix used by the human (new int[] { ... })

Scorecard

Metric Result
Build-breaking changes fixed by skill 2/2 (100%)
Files correctly handled 30/32 (94%)
Build after skill-guided migration Passed
Skill fix matches gold commit Exact match for both code fixes

The 2 uncovered files are a PowerShell-specific BOM manifest (windows.json) and a doc file -- neither is a .NET breaking change.

Note: SYSLIB0063 was discovered through this test and was not in Microsoft's breaking change docs (the runtime PR dotnet/runtime#120328 still has the needs-breaking-change-doc-created label). It was added to the skill's core-libraries.md as a result of this validation.

danmoseley and others added 2 commits February 27, 2026 21:03
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
Copy link
Member Author

This skill isn't super compelling right now as there aren't many changes, but there are also few users so I think it's reaosnable to merge it now and we'll iterate in future previews and learn.

@danmoseley
Copy link
Member Author

getting some more reviews

@danmoseley
Copy link
Member Author

Closing in favor of a new PR — this one was orphaned when the fork relationship with dotnet/skills was re-established.

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.

2 participants