Loading...
Loading...
Migrate a .NET 10 project or solution to .NET 11 and resolve all breaking changes. This is a MIGRATION skill — use it when upgrading from .NET 10 to .NET 11, NOT for writing new programs. USE FOR: upgrading TargetFramework from net10.0 to net11.0, fixing build errors after updating the .NET 11 SDK, resolving source-breaking and behavioral changes in .NET 11 runtime, C# 15 compiler, and EF Core 11, adapting to updated minimum hardware requirements (x86-64-v2, Arm64 LSE), and updating CI/CD pipelines and Dockerfiles for .NET 11. DO NOT USE FOR: .NET Framework migrations, upgrading from .NET 9 or earlier, greenfield .NET 11 projects, or cosmetic modernization unrelated to the upgrade. NOTE: .NET 11 is in preview. Covers breaking changes through Preview 3.
npx skill4agent add dotnet/skills migrate-dotnet10-to-dotnet11net11.0Note: .NET 11 is currently in preview. This skill covers breaking changes documented through Preview 3.
TargetFrameworknet10.0net11.0net11.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, Cosmos DB, etc. Auto-detect from PackageReferences and SDK attributes if not provided |
Answer directly from the loaded reference documents for information about .NET 11 breaking changes. You may inspect the local repository (project/solution files, source code, configuration, build/test scripts) as needed to determine which changes apply. Do not fetch web pages or other external sources for breaking change information — the loaded references are the authoritative source. Focus on identifying which breaking changes apply and providing concrete fixes.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.EntityFrameworkCore.CosmosNamedPipeClientStreamSafePipeHandleBackgroundServiceMicrosoft.OpenApidotnet build --no-incrementalbinobjnet10.0.csprojDirectory.Build.props<TargetFramework>net10.0</TargetFramework><TargetFramework>net11.0</TargetFramework>net11.0<TargetFrameworks>net10.0Microsoft.Extensions.*Microsoft.AspNetCore.*Microsoft.EntityFrameworkCore.*Directory.Packages.propsdotnet restoredotnet build| Reference file | When to load |
|---|---|
| Always (C# 15 compiler breaking changes) |
| Always (applies to all .NET 11 projects) |
| Always (SDK and build tooling changes) |
| Project uses ASP.NET Core (OpenAPI, Blazor) |
| Project uses Entity Framework Core |
| Project uses cryptography APIs, mTLS, or targets macOS |
| Deploying to older hardware, embedded devices, or using NativeAOT |
Span<T>ReadOnlySpan<T>declaration-blockref readonlyInAttributeref readonlyref readonlySystem.Runtime.InteropServices.InAttributenameof(this.)this.nameof(P)nameof(this.P)with()with(...)@with(...)with&&||&&||dynamicdynamicToList()SaveChanges()NamedPipeClientStreamisConnectedbool isConnectedisConnectedTreatWarningsAsErrorswhen(X.Y) whenwhenwhenMicrosoft.AspNetCore.OpenApiMicrosoft.OpenApiMicrosoft.OpenApiOpenApiDocumentOpenApiSchemaMicrosoft.EntityFrameworkCore.Tools.Tasks.DesignPackageReference<EFScaffoldModelStage><EFPrecompileQueriesStage>ZipArchive.CreateAsyncx86-64-v2LSEExecuteAsync()InvalidDataExceptionHardLinkHardLinkOverscanCountMicrosoft.Data.SqlClient.Extensions.Azurebundle_e_sqlcipherlibliblibMyLib.so# Before
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
FROM mcr.microsoft.com/dotnet/aspnet:10.0
# After
FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build
FROM mcr.microsoft.com/dotnet/aspnet:11.0global.jsonsdk.versionrollForward {
"sdk": {
- "version": "10.0.100",
- "rollForward": "latestFeature"
+ "version": "11.0.100-preview.3",
+ "rollForward": "latestFeature"
},
"otherSettings": {
"...": "..."
}
}dotnet build --no-incrementaldotnet testreferences/| Reference file | When to load |
|---|---|
| Always (C# 15 compiler breaking changes) |
| Always (applies to all .NET 11 projects) |
| Always (SDK and build tooling changes) |
| Project uses ASP.NET Core (OpenAPI, Blazor) |
| Project uses Entity Framework Core |
| Project uses cryptography APIs, mTLS, or targets macOS |
| Deploying to older hardware, embedded devices, or using NativeAOT |