migrate-dotnet9-to-dotnet10

Migrate .NET 9 projects to .NET 10 and resolve all breaking changes.

Updated Jul 12, 2026
One-click install
npx skills add https://github.com/Patrick-Rex/DotNetTechSamples --skill migrate-dotnet9-to-dotnet10-patrick-rex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-dotnet9-to-dotnet10
Source: https://github.com/Patrick-Rex/DotNetTechSamples/tree/main/.agents/plugins/dotnet-upgrade/skills/migrate-dotnet9-to-dotnet10
Command: npx skills add https://github.com/Patrick-Rex/DotNetTechSamples --skill migrate-dotnet9-to-dotnet10-patrick-rex

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Upgrading a project from .NET 9 to .NET 10 introduces dozens of breaking changes across the compiler, runtime, ASP.NET Core, EF Core, cryptography, and SDK tooling. This Skill provides a systematic, step-by-step workflow to update the target framework, fix build errors, address behavioral changes, and update infrastructure so the migrated project builds cleanly and passes tests. ## Core Features & Use Cases - Guided six-step migration workflow: Assess the project, update the TargetFramework to net10.0, resolve source-incompatible changes, address behavioral changes, update Dockerfiles and CI/CD, then verify with builds and tests. - Comprehensive breaking-change references: Ten technology-specific reference documents covering C# 14 compiler changes, core libraries, SDK/MSBuild, ASP.NET Core, EF Core, cryptography, extensions/hosting, serialization/networking, WinForms/WPF, and containers/interop. - Concrete fix patterns: Includes before/after code for SYSLIB0058-SYSLIB0062 obsoletions, the C# 14 field and extension keywords, span overload resolution, Microsoft.OpenApi v2 API changes, and System.Linq.Async migration to built-in AsyncEnumerable. - Use Case: You updated to the .NET 10 SDK and your solution now fails with CS9272 errors, NU1510 warnings, and EF Core query regressions. This Skill walks you through each failure category with the exact fix. ## Quick Start Ask the assistant to migrate your .NET 9 solution to .NET 10 by pointing it at your .csproj, .sln, or .slnx file and letting it follow the migration workflow.

Frequently Asked Questions about migrate-dotnet9-to-dotnet10

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate a .NET 9 project to .NET 10?

Update the TargetFramework in each .csproj from net9.0 to net10.0, bump Microsoft package references to 10.0.x versions, run dotnet restore, then fix build errors and behavioral changes. This Skill provides a six-step workflow covering assessment, TFM update, source fixes, behavioral changes, infrastructure, and verification.

What breaking changes does .NET 10 introduce in C# 14?

C# 14 makes field a contextual keyword inside property accessors (locals named field cause error CS9272), reserves extension as a keyword, and changes overload resolution so span-based overloads may bind instead of Enumerable methods. Fixes include renaming variables, escaping with @field, or adding .AsEnumerable() casts.

Can I upgrade directly from .NET 8 to .NET 10 with this Skill?

No. This Skill only covers the net9.0 to net10.0 migration. For .NET 8 or earlier, first use the migrate-dotnet8-to-dotnet9 skill to reach net9.0, then apply this Skill for the final step to net10.0.

How do I fix System.Linq.Async conflicts after upgrading to .NET 10?

.NET 10 includes built-in System.Linq.AsyncEnumerable, which conflicts with the community System.Linq.Async package. Remove the package reference or upgrade it to v7.0.0; if consumed transitively, add ExcludeAssets compile metadata, and rename SelectAwait calls to Select.

Why did my .NET 10 Docker build change base images?

Default .NET 10 container image tags now use Ubuntu 24.04 instead of Debian, and Debian images are no longer shipped. Update Dockerfiles to mcr.microsoft.com/dotnet/sdk:10.0 and aspnet:10.0 tags, and verify any apt-get commands or Debian-specific native dependencies still work.

What EF Core 10 breaking changes affect existing queries?

EF Core 10 translates .Contains() on collections to multiple scalar parameters instead of OPENJSON, uses the json data type on Azure SQL with compatibility level 170, and changes ExecuteUpdateAsync to accept a regular lambda. Mitigations include UseParameterizedCollectionMode and explicit HasColumnType configuration.