Loading...
Loading...
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).
npx skill4agent add dotnet/skills migrate-dotnet9-to-dotnet10net10.0TargetFrameworknet9.0net10.0System.Linq.AsyncSystem.Linq.AsyncEnumerablenet10.0migrate-dotnet8-to-dotnet9net9.0net9.0net10.0| Input | Required | Description |
|---|---|---|
| Project or solution path | Yes | The |
| Build command | No | How to build (e.g., |
| Test command | No | How to run tests (e.g., |
| 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 |
Answer directly from the loaded reference documents. Do not search the filesystem or fetch web pages for breaking change information — the references contain the authoritative details. Focus on identifying which breaking changes apply and providing concrete fixes. Exception: If you suspect a security vulnerability (CVE) may apply to the project's dependencies, check for published security advisories — the reference documents may not cover post-publication CVEs.Commit strategy: Commit at each logical boundary — after updating the TFM (Step 2), after resolving build errors (Step 3), after addressing behavioral changes (Step 4), and after updating infrastructure (Step 5). This keeps each commit focused and reviewable.
.sln.slnx.csprojdotnet --versionMicrosoft.NET.Sdk.WebMicrosoft.NET.Sdk.WindowsDesktop<UseWPF><UseWindowsForms>Microsoft.EntityFrameworkCore.*Microsoft.Data.SqliteMicrosoft.Extensions.HostingSystem.Linq.AsyncSystem.Text.Jsondotnet build --no-incrementalbinobjnet9.0.csprojDirectory.Build.props<TargetFramework>net9.0</TargetFramework><TargetFramework>net10.0</TargetFramework>net10.0<TargetFrameworks>net9.0Microsoft.Extensions.*Microsoft.AspNetCore.*Microsoft.EntityFrameworkCore.*Directory.Packages.propsdotnet restore<PackageReference><PackageReference>Versiondotnet restore| If the project uses… | Load reference |
|---|---|
| Any .NET 10 project | |
| Any .NET 10 project | |
| Any .NET 10 project | |
| ASP.NET Core | |
| Entity Framework Core | |
| Cryptography APIs | |
| Microsoft.Extensions.Hosting, BackgroundService, configuration | |
| System.Text.Json, XmlSerializer, HttpClient, MailAddress, Uri | |
| Windows Forms or WPF | |
| Docker containers, single-file apps, native interop | |
System.Linq.AsyncSystem.Linq.Async<ExcludeAssets>compile</ExcludeAssets>SelectAwaitSelectSYSLIB0058SslStream.KeyExchangeAlgorithmCipherAlgorithmHashAlgorithmNegotiatedCipherSuiteSYSLIB0059SystemEvents.EventsThreadShutdownAppDomain.ProcessExitSYSLIB0060Rfc2898DeriveBytesRfc2898DeriveBytes.Pbkdf2SYSLIB0061Queryable.MaxByMinByIComparer<TSource>IComparer<TKey>SYSLIB0062XsltSettings.EnableScriptfieldfieldgetsetinitfieldfieldthis.fieldValue@fieldreferences/csharp-compiler-dotnet9to10.mdextensionextension@extension.Contains()MemoryExtensions.ContainsEnumerable.ContainsEnumerable.ReverseSpanIEnumerable<T>.AsEnumerable()references/csharp-compiler-dotnet9to10.mdWebHostBuilderIWebHostWebHostHost.CreateDefaultBuilderWebApplication.CreateBuilderIActionContextAccessorActionContextAccessorWithOpenApiIncludeOpenAPIAnalyzersIPNetworkForwardedHeadersOptions.KnownNetworksMicrosoft.Extensions.ApiDescription.ClientMicrosoft.OpenApiMicrosoft.AspNetCore.OpenApi 10.0Microsoft.OpenApiOpenApiStringOpenApiAnyJsonNodeOpenApiSecurityScheme.ReferenceOpenApiSecuritySchemeReferenceOpenApiSchema.Nullablereferences/aspnet-core-dotnet9to10.mddotnet new sln--format slndnx.ps1project.jsondotnet restorereferences/efcore-dotnet9to10.mdExecuteUpdateAsyncIDiscriminatorPropertySetConventionIRelationalCommandDiagnosticsLoggerlogCommandTextMenuItemContextMenuHtmlElement.InsertAdjacentElementColumnDefinitionsRowDefinitionsMLDsaSlhDsaSecretKeyPrivateKeyExportMLDsaSecretKeyExportMLDsaPrivateKeySecretKeySizeInBytesPrivateKeySizeInBytesRfc2898DeriveBytesRfc2898DeriveBytes.Pbkdf2(password, salt, iterations, hashAlgorithm, outputLength)CoseSigner.KeyX509Certificate.GetKeyAlgorithmParameters()PublicKey.EncodedParametersCLR_OPENSSL_VERSION_OVERRIDEDOTNET_OPENSSL_VERSION_OVERRIDEAppDomain.ProcessExitAssemblyLoadContext.UnloadingPosixSignalRegistration.Create(PosixSignal.SIGTERM, _ => Environment.Exit(0))awaitStartAsyncIHostedLifecycleServicenullnullGetDateTimeOffsetDateTimeOffsetGetDateTimeDateTimeKind.UtcAppContext.SetSwitch("Microsoft.Data.Sqlite.Pre10TimeZoneHandling", true).Contains()UseParameterizedCollectionMode(ParameterTranslationMode.Parameter)jsonnvarchar(max)HasColumnType("nvarchar(max)")$type$id$refInvalidOperationException[JsonIgnore]BufferedStream.WriteByteFlush()DriveInfo.DriveFormatDirectoryControlDllImportSearchPath.AssemblyDirectoryMailAddressUriUriXmlSerializer[Obsolete][XmlIgnore]dotnet restoredotnet watchdotnetreferences/sdk-msbuild-dotnet9to10.mdStatusStripTreeViewDynamicResource# Before
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
FROM mcr.microsoft.com/dotnet/aspnet:9.0
# After
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
FROM mcr.microsoft.com/dotnet/aspnet:10.0global.json{
"sdk": {
"version": "10.0.100"
}
}DOTNET_OPENSSL_VERSION_OVERRIDEDOTNET_ICU_VERSION_OVERRIDENUGET_ENABLE_ENHANCED_HTTP_RETRYdotnet new sln--format slndotnet build --no-incrementaldotnet test.Contains()SslStream[XmlIgnore][JsonIgnore]UritrueApplication Namedotnet restorereferences/| Reference file | When to load |
|---|---|
| Always (C# 14 compiler breaking changes — field keyword, extension keyword, span overloads) |
| Always (applies to all .NET 10 projects) |
| Always (SDK and build tooling changes) |
| Project uses ASP.NET Core |
| Project uses Entity Framework Core or Microsoft.Data.Sqlite |
| Project uses System.Security.Cryptography or X.509 certificates |
| Project uses Generic Host, BackgroundService, or Microsoft.Extensions.Configuration |
| Project uses System.Text.Json, XmlSerializer, HttpClient, or networking APIs |
| Project uses Windows Forms or WPF |
| Project uses Docker containers, single-file publishing, or native interop (P/Invoke) |