# Migrate Dotnet9 To Dotnet10

Migrate a .NET 9 project or solution to .NET 10 and resolve all breaking changes.

- Repository: https://github.com/managedcode/dotnet-skills (500 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add managedcode/dotnet-skills --skill migrate-dotnet9-to-dotnet10 -g -a claude-code -y`
Codex: `npx skills add managedcode/dotnet-skills --skill migrate-dotnet9-to-dotnet10 -g -a codex -y`
Cursor: `npx skills add managedcode/dotnet-skills --skill migrate-dotnet9-to-dotnet10 -g -a cursor -y`
Gemini CLI: `npx skills add managedcode/dotnet-skills --skill migrate-dotnet9-to-dotnet10 -g -a gemini-cli -y`

## Description

Migrate a .NET 9 project or solution to .NET 10 and resolve all breaking changes. USE FOR: upgrading TargetFramework from net9.0 to net10.0, fixing build errors after updating the .NET 10 SDK, resolving source and behavioral changes in .NET 10 / C# 14 / ASP.NET Core 10 / EF Core 10, updating Dockerfiles for Debian-to-Ubuntu base images, resolving obsoletion warnings (SYSLIB0058-SYSLIB0062), adapting to SDK/NuGet changes (NU1510, PrunePackageReference), migrating System.Linq.Async to built-in AsyncEnumerable, fixing OpenApi v2 API changes, cryptography renames, and C# 14 compiler changes (field keyword, extension keyword, span overloads). DO NOT USE FOR: .NET Framework migrations, upgrading from .NET 8 or earlier (use migrate-dotnet8-to-dotnet9 first), greenfield .NET 10 projects, or cosmetic modernization. LOADS REFERENCES: csharp-compiler, core-libraries, sdk-msbuild (always); aspnet-core, efcore, cryptography, extensions-hosting, serialization-networking, winforms-wpf, containers-interop (selective).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# .NET 9 → .NET 10 Migration

Migrate a .NET 9 project or solution to .NET 10, systematically resolving all breaking changes. The outcome is a project targeting `net10.0` that builds cleanly, passes tests, and accounts for every behavioral, source-incompatible, and binary-incompatible change introduced in the .NET 10 release.

## When to Use

- Upgrading `TargetFramework` from `net9.0` to `net10.0`
- Resolving build errors or new warnings after updating the .NET 10 SDK
- Adapting to behavioral changes in .NET 10 runtime, ASP.NET Core 10, or EF Core 10
- Updating CI/CD pipelines, Dockerfiles, or deployment scripts for .NET 10
- Migrating from the community `System.Linq.Async` package to the built-in `System.Linq.AsyncEnumerable`

## When Not to Use

- The project already targets `net10.0` and builds cleanly, migration is done
- Upgrading from .NET 8 or earlier, use the `migrate-dotnet8-to-dotnet9` skill first to reach `net9.0`, then return to this skill for the `net9.0` → `net10.0` migration
- Migrating from .NET Framework, that is a separate, larger effort
- Greenfield projects that start on .NET 10 (no migration needed)

## Inputs

| Input | Required | Description |
|-------|----------|-------------|
| Project or solution path | Yes | The `.csproj`, `.sln`, or `.slnx` entry point to migrate |
| Build command | No | How to build (e.g., `dotnet build`, a repo build script). Auto-detect if not provided |
| Test command | No | How to run tests (e.g., `dotnet test`). Auto-detect if not provided |
| Project type hints | No | Whether the project uses ASP.NET Core, EF Core, WinForms, WPF, containers, etc. Auto-detect from PackageReferences and SDK attributes if not provided |

## Workflow

The rest: https://github.com/managedcode/dotnet-skills/blob/HEAD/catalog/Platform/Official-DotNet-Upgrade/skills/migrate-dotnet9-to-dotnet10/SKILL.md
