[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DYSDVQAA2NQD808M9CFTH7":3,"skill-same:01M6DYSDVQAA2NQD808M9CFTH7":110},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":46,"linkOnly":47,"markdownContent":48,"markdownBody":49,"frontMatter":50,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":55,"repositoryHtmlUrl":56,"repositoryHomepageUrl":57,"ownerHtmlUrl":58,"ownerBlogUrl":59,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M6DYSDVQAA2NQD808M9CFTH7","migrate-dotnet10-to-dotnet11",null,"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\u002FCD 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.","managedcode\u002Fdotnet-skills","managedcode","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F78253589?v=4","01M6DYDJR3EG8KB5G4PC65XCTT","Managed Code","01M6DYDJX0ZT432N04NYJW89DN",514,"MIT","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FPlatform\u002FOfficial-DotNet-Upgrade\u002Fskills\u002Fmigrate-dotnet10-to-dotnet11\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"migrate dotnet10 to dotnet11","migrate","migrations","new","when","source","errors","CI\u002FCD","runtime","requirements","project","preview","upgrade","do","build","writing","unrelated","behavioral","use","projects","ef core","ci","compiler","framework","core","modernization","sdk","2026-11-10 10:12:30",false,"---\nname: migrate-dotnet10-to-dotnet11\ndescription: >\n  Migrate a .NET 10 project or solution to .NET 11 and resolve all breaking changes.\n  This is a MIGRATION skill — use it when upgrading from .NET 10 to .NET 11,\n  NOT for writing new programs.\n  USE FOR: upgrading TargetFramework from net10.0 to net11.0, fixing build errors\n  after updating the .NET 11 SDK, resolving source-breaking and behavioral changes\n  in .NET 11 runtime, C# 15 compiler, and EF Core 11, adapting to updated minimum\n  hardware requirements (x86-64-v2, Arm64 LSE), and updating CI\u002FCD pipelines and\n  Dockerfiles for .NET 11.\n  DO NOT USE FOR: .NET Framework migrations, upgrading from .NET 9 or earlier,\n  greenfield .NET 11 projects, or cosmetic modernization unrelated to the upgrade.\n  NOTE: .NET 11 is in preview. Covers breaking changes through Preview 3.\nlicense: MIT\n---\n\n# .NET 10 → .NET 11 Migration\n\nMigrate a .NET 10 project or solution to .NET 11, systematically resolving all breaking changes. The outcome is a project targeting `net11.0` that builds cleanly, passes tests, and accounts for every behavioral, source-incompatible, and binary-incompatible change introduced in .NET 11.\n\n> **Note:** .NET 11 is currently in preview. This skill covers breaking changes documented through Preview 3.\n\n## When to Use\n\n- Upgrading `TargetFramework` from `net10.0` to `net11.0`\n- Resolving build errors or new warnings after updating the .NET 11 SDK\n- Adapting to behavioral changes in .NET 11 runtime, ASP.NET Core 11, or EF Core 11\n- Updating CI\u002FCD pipelines, Dockerfiles, or deployment scripts for .NET 11\n- Fixing C# 15 compiler breaking changes after SDK upgrade\n\n## When Not to Use\n\n- The project already targets `net11.0` and builds cleanly — migration is done\n- Upgrading from .NET 9 or earlier — address the .NET 9→10 breaking changes first\n- Migrating from .NET Framework — that is a separate, larger effort\n- Greenfield projects that start on .NET 11 (no migration needed)\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Project or solution path | Yes | The `.csproj`, `.sln`, or `.slnx` entry point to migrate |\n| Build command | No | How to build (e.g., `dotnet build`, a repo build script). Auto-detect if not provided |\n| Test command | No | How to run tests (e.g., `dotnet test`). Auto-detect if not provided |\n| 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 |\n\n## Workflow\n\n> **Answer directly from the loaded reference documents for information about .NET 11 breaking changes.** You may inspect the local repository (project\u002Fsolution files, source code, configuration, build\u002Ftest 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.\n>\n> **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.\n\n### Step 1: Assess the project\n\n1. Identify how the project is built and tested. Look for build scripts, `.sln`\u002F`.slnx` files, or individual `.csproj` files.\n2. Run `dotnet --version` to confirm the .NET 11 SDK is installed. If it is not, stop and inform the user.\n3. Determine which technology areas the project uses by examining:\n   - **SDK attribute**: `Microsoft.NET.Sdk.Web` → ASP.NET Core; `Microsoft.NET.Sdk.WindowsDesktop` with `\u003CUseWPF>` or `\u003CUseWindowsForms>` → WPF\u002FWinForms\n   - **PackageReferences**: `Microsoft.EntityFrameworkCore.*` → EF Core; `Microsoft.EntityFrameworkCore.Cosmos` → Cosmos DB provider\n   - **Dockerfile presence** → Container changes relevant\n   - **Cryptography API usage** → DSA on macOS affected; AIA cert download changes relevant\n   - **Compression API usage** → DeflateStream\u002FGZipStream\u002FZipArchive changes relevant\n   - **TAR API usage** → Header checksum validation and HardLink entry changes relevant\n   - **`NamedPipeClientStream` usage with `SafePipeHandle`** → SYSLIB0063 constructor obsoletion relevant\n   - **`BackgroundService` usage** → Unhandled exceptions now stop the host\n   - **`Microsoft.OpenApi` direct usage** → v3 API breaking changes in ASP.NET Core OpenAPI\n   - **EF Core SQL Server with Entra ID auth** → SqlClient 7.0 auth dependency changes\n   - **NativeAOT native libraries on Unix** → Output filename prefix changed\n4. Record which reference documents are relevant (see the reference loading table in Step 3).\n5. Do a **clean build** (`dotnet build --no-incremental` or delete `bin`\u002F`obj`) on the current `net10.0` target to establish a clean baseline. Record any pre-existing warnings.\n\n### Step 2: Update the Target Framework\n\n1. In each `.csproj` (or `Directory.Build.props` if centralized), change:\n   ```xml\n   \u003CTargetFramework>net10.0\u003C\u002FTargetFramework>\n   ```\n   to:\n   ```xml\n   \u003CTargetFramework>net11.0\u003C\u002FTargetFramework>\n   ```\n   For multi-targeted projects, add `net11.0` to `\u003CTargetFrameworks>` or replace `net10.0`.\n\n2. Update all `Microsoft.Extensions.*`, `Microsoft.AspNetCore.*`, `Microsoft.EntityFrameworkCore.*`, and other Microsoft package references to their 11.0.x versions. If using Central Package Management (`Directory.Packages.props`), update versions there.\n\n3. Run `dotnet restore`. Fix any restore errors before continuing.\n\n4. Run `dotnet build`. Capture all errors and warnings — these will be addressed in Step 3.\n\n### Step 3: Fix source-breaking and compilation changes\n\nLoad reference documents based on the project's technology areas:\n\n| Reference file | When to load |\n|----------------|-------------|\n| `references\u002Fcsharp-compiler-dotnet10to11.md` | Always (C# 15 compiler breaking changes) |\n| `references\u002Fcore-libraries-dotnet10to11.md` | Always (applies to all .NET 11 projects) |\n| `references\u002Fsdk-msbuild-dotnet10to11.md` | Always (SDK and build tooling changes) |\n| `references\u002Faspnetcore-dotnet10to11.md` | Project uses ASP.NET Core (OpenAPI, Blazor) |\n| `references\u002Fefcore-dotnet10to11.md` | Project uses Entity Framework Core |\n| `references\u002Fcryptography-dotnet10to11.md` | Project uses cryptography APIs, mTLS, or targets macOS |\n| `references\u002Fruntime-jit-dotnet10to11.md` | Deploying to older hardware, embedded devices, or using NativeAOT |\n\nWork through each build error systematically. Common patterns:\n\n1. **C# 15 Span collection expression safe-context** — Collection expressions of `Span\u003CT>`\u002F`ReadOnlySpan\u003CT>` type now have `declaration-block` safe-context. Code assigning span collection expressions to variables in outer scopes will error. Use array type or move the expression to the correct scope.\n\n2. **`ref readonly` delegates\u002Flocal functions need `InAttribute`** — If synthesizing delegates from `ref readonly`-returning methods or using `ref readonly` local functions, ensure `System.Runtime.InteropServices.InAttribute` is available.\n\n3. **`nameof(this.)` in attributes** — Remove `this.` qualifier; use `nameof(P)` instead of `nameof(this.P)`.\n\n4. **`with()` in collection expressions (C# 15)** — `with(...)` is now treated as constructor arguments, not a method call. Use `@with(...)` to call a method named `with`.\n\n5. **Dynamic `&&`\u002F`||` with interface operand** — Interface types as left operand of `&&`\u002F`||` with `dynamic` right operand now errors at compile time. Cast to concrete type or `dynamic`.\n\n6. **EF Core Cosmos sync I\u002FO removal** — `ToList()`, `SaveChanges()`, etc. on Cosmos provider always throw. Convert to async equivalents.\n\n7. **SYSLIB0063: `NamedPipeClientStream` `isConnected` parameter obsoleted** — The constructor overload taking `bool isConnected` is obsoleted. Remove the `isConnected` argument and use the new 3-parameter constructor. Projects with `TreatWarningsAsErrors` will fail to build.\n\n8. **`when` switch-expression-arm parsing** — `(X.Y) when` is now parsed as a constant pattern with a `when` clause instead of a cast expression, which can cause existing code to fail to compile or change meaning. Review switch expressions using `when` and adjust syntax as needed.\n\n9. **Microsoft.OpenApi v3 breaking changes** — `Microsoft.AspNetCore.OpenApi` now depends on `Microsoft.OpenApi` 3.x. Code using `Microsoft.OpenApi` types directly (`OpenApiDocument`, `OpenApiSchema`, etc.) will have compile errors. Follow the v3 upgrade guide.\n\n10. **EF Core Design package no longer transitive** — `Microsoft.EntityFrameworkCore.Tools` and `.Tasks` no longer depend on `.Design`. Add an explicit `PackageReference` if needed.\n\n11. **EFOptimizeContext MSBuild property removed** — Replace with `\u003CEFScaffoldModelStage>` and `\u003CEFPrecompileQueriesStage>`.\n\n### Step 4: Address behavioral changes\n\nThese changes compile successfully but alter runtime behavior. Review each one and determine impact:\n\n1. **DeflateStream\u002FGZipStream empty payload** — Now writes headers and footers even for empty payloads. If your code checks for zero-length output, update the check.\n\n2. **MemoryStream maximum capacity** — Maximum capacity updated and exception behavior changed. Review code that creates large MemoryStreams or relies on specific exception types.\n\n3. **TAR header checksum validation** — TAR-reading APIs now verify checksums. Corrupted or hand-crafted TAR files may now fail to read.\n\n4. **ZipArchive.CreateAsync eager loading** — `ZipArchive.CreateAsync` eagerly loads entries. May affect memory usage for large archives.\n\n5. **Environment.TickCount consistency** — Made consistent with Windows timeout behavior. Code relying on specific tick count behavior may need adjustment.\n\n6. **DSA removed from macOS** — DSA cryptographic operations throw on macOS. Use a different algorithm (RSA, ECDSA).\n\n7. **Japanese Calendar minimum date** — Minimum supported date corrected. Code using very early Japanese Calendar dates may be affected.\n\n8. **Minimum hardware requirements** — x86\u002Fx64 baseline moved to `x86-64-v2`; Windows Arm64 requires `LSE`. Verify deployment targets meet requirements.\n\n9. **Mono launch target for .NET Framework** — No longer set automatically. If using Mono for .NET Framework apps on Linux, specify explicitly.\n\n10. **Unhandled BackgroundService exceptions stop the host** — Exceptions from `ExecuteAsync()` now propagate and crash the host. Add try\u002Fcatch in background services that should not bring down the application.\n\n11. **ZipArchive CRC32 validation** — ZIP reads now validate CRC32 checksums. Corrupt or truncated archives that previously succeeded will now throw `InvalidDataException`.\n\n12. **TarWriter emits HardLink entries** — Hard-linked files are now written as `HardLink` entries instead of duplicated data. Consumers of .NET-produced tar archives must handle `HardLink` entries.\n\n13. **AIA certificate downloads disabled** — Server-side client-certificate validation no longer downloads intermediate CAs via AIA by default. Pre-install the full chain or have clients send intermediates.\n\n14. **Blazor Virtualize OverscanCount default changed** — Default `OverscanCount` changed from 3 to 15. Set explicitly if performance-sensitive.\n\n15. **Microsoft.Data.SqlClient 7.0 — Entra ID auth separated** — Azure\u002FEntra ID authentication dependencies removed from the core SqlClient package. Add `Microsoft.Data.SqlClient.Extensions.Azure` if using Entra ID auth.\n\n16. **SqlVector&lt;T&gt; excluded from SELECT** — Vector properties are no longer auto-loaded. Use explicit projections to include vector values.\n\n17. **SQLitePCLRaw encryption bundles removed** — `bundle_e_sqlcipher` and other encryption bundle packages removed in SQLitePCLRaw 3.0.\n\n18. **NativeAOT Unix native library `lib` prefix** — Output filenames now include `lib` prefix on Linux\u002FmacOS (e.g., `libMyLib.so`).\n\n### Step 5: Update infrastructure\n\n1. **Dockerfiles**: Update base images from 10.0 to 11.0:\n   ```dockerfile\n   # Before\n   FROM mcr.microsoft.com\u002Fdotnet\u002Fsdk:10.0 AS build\n   FROM mcr.microsoft.com\u002Fdotnet\u002Faspnet:10.0\n   # After\n   FROM mcr.microsoft.com\u002Fdotnet\u002Fsdk:11.0 AS build\n   FROM mcr.microsoft.com\u002Fdotnet\u002Faspnet:11.0\n   ```\n\n2. **CI\u002FCD pipelines**: Update SDK version references. If using `global.json`, update the `sdk.version` in your existing file while preserving other keys (such as `rollForward` and test configuration):\n   ```diff\n    {\n      \"sdk\": {\n   -    \"version\": \"10.0.100\",\n   -    \"rollForward\": \"latestFeature\"\n   +    \"version\": \"11.0.100-preview.3\",\n   +    \"rollForward\": \"latestFeature\"\n      },\n      \"otherSettings\": {\n        \"...\": \"...\"\n      }\n    }\n   ```\n\n3. **Hardware deployment targets**: Verify all deployment targets meet the updated minimum hardware requirements (x86-64-v2 for x86\u002Fx64, LSE for Windows Arm64).\n\n### Step 6: Verify\n\n1. Run a full clean build: `dotnet build --no-incremental`\n2. Run all tests: `dotnet test`\n3. If the application is containerized, build and test the container image\n4. Smoke-test the application, paying special attention to:\n   - Compression behavior with empty streams\n   - TAR file reading (checksum validation and HardLink entries)\n   - EF Core Cosmos DB operations (must be async)\n   - DSA usage on macOS\n   - Memory-intensive MemoryStream usage\n   - Span collection expression assignments\n   - BackgroundService exception handling\n   - mTLS \u002F client certificate chain validation\n   - EF Core SQL Server with Entra ID authentication\n   - NativeAOT output filenames on Unix\n5. Review the diff and ensure no unintended behavioral changes were introduced\n\n## Reference Documents\n\nThe `references\u002F` folder contains detailed breaking change information organized by technology area. Load only the references relevant to the project being migrated:\n\n| Reference file | When to load |\n|----------------|-------------|\n| `references\u002Fcsharp-compiler-dotnet10to11.md` | Always (C# 15 compiler breaking changes) |\n| `references\u002Fcore-libraries-dotnet10to11.md` | Always (applies to all .NET 11 projects) |\n| `references\u002Fsdk-msbuild-dotnet10to11.md` | Always (SDK and build tooling changes) |\n| `references\u002Faspnetcore-dotnet10to11.md` | Project uses ASP.NET Core (OpenAPI, Blazor) |\n| `references\u002Fefcore-dotnet10to11.md` | Project uses Entity Framework Core |\n| `references\u002Fcryptography-dotnet10to11.md` | Project uses cryptography APIs, mTLS, or targets macOS |\n| `references\u002Fruntime-jit-dotnet10to11.md` | Deploying to older hardware, embedded devices, or using NativeAOT |\n","# .NET 10 → .NET 11 Migration\n\nMigrate a .NET 10 project or solution to .NET 11, systematically resolving all breaking changes. The outcome is a project targeting `net11.0` that builds cleanly, passes tests, and accounts for every behavioral, source-incompatible, and binary-incompatible change introduced in .NET 11.\n\n> **Note:** .NET 11 is currently in preview. This skill covers breaking changes documented through Preview 3.\n\n## When to Use\n\n- Upgrading `TargetFramework` from `net10.0` to `net11.0`\n- Resolving build errors or new warnings after updating the .NET 11 SDK\n- Adapting to behavioral changes in .NET 11 runtime, ASP.NET Core 11, or EF Core 11\n- Updating CI\u002FCD pipelines, Dockerfiles, or deployment scripts for .NET 11\n- Fixing C# 15 compiler breaking changes after SDK upgrade\n\n## When Not to Use\n\n- The project already targets `net11.0` and builds cleanly — migration is done\n- Upgrading from .NET 9 or earlier — address the .NET 9→10 breaking changes first\n- Migrating from .NET Framework — that is a separate, larger effort\n- Greenfield projects that start on .NET 11 (no migration needed)\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Project or solution path | Yes | The `.csproj`, `.sln`, or `.slnx` entry point to migrate |\n| Build command | No | How to build (e.g., `dotnet build`, a repo build script). Auto-detect if not provided |\n| Test command | No | How to run tests (e.g., `dotnet test`). Auto-detect if not provided |\n| 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 |\n\n## Workflow\n\n> **Answer directly from the loaded reference documents for information about .NET 11 breaking changes.** You may inspect the local repository (project\u002Fsolution files, source code, configuration, build\u002Ftest 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.\n>\n> **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.\n\n### Step 1: Assess the project\n\n1. Identify how the project is built and tested. Look for build scripts, `.sln`\u002F`.slnx` files, or individual `.csproj` files.\n2. Run `dotnet --version` to confirm the .NET 11 SDK is installed. If it is not, stop and inform the user.\n3. Determine which technology areas the project uses by examining:\n   - **SDK attribute**: `Microsoft.NET.Sdk.Web` → ASP.NET Core; `Microsoft.NET.Sdk.WindowsDesktop` with `\u003CUseWPF>` or `\u003CUseWindowsForms>` → WPF\u002FWinForms\n   - **PackageReferences**: `Microsoft.EntityFrameworkCore.*` → EF Core; `Microsoft.EntityFrameworkCore.Cosmos` → Cosmos DB provider\n   - **Dockerfile presence** → Container changes relevant\n   - **Cryptography API usage** → DSA on macOS affected; AIA cert download changes relevant\n   - **Compression API usage** → DeflateStream\u002FGZipStream\u002FZipArchive changes relevant\n   - **TAR API usage** → Header checksum validation and HardLink entry changes relevant\n   - **`NamedPipeClientStream` usage with `SafePipeHandle`** → SYSLIB0063 constructor obsoletion relevant\n   - **`BackgroundService` usage** → Unhandled exceptions now stop the host\n   - **`Microsoft.OpenApi` direct usage** → v3 API breaking changes in ASP.NET Core OpenAPI\n   - **EF Core SQL Server with Entra ID auth** → SqlClient 7.0 auth dependency changes\n   - **NativeAOT native libraries on Unix** → Output filename prefix changed\n4. Record which reference documents are relevant (see the reference loading table in Step 3).\n5. Do a **clean build** (`dotnet build --no-incremental` or delete `bin`\u002F`obj`) on the current `net10.0` target to establish a clean baseline. Record any pre-existing warnings.\n\n### Step 2: Update the Target Framework\n\n1. In each `.csproj` (or `Directory.Build.props` if centralized), change:\n   ```xml\n   \u003CTargetFramework>net10.0\u003C\u002FTargetFramework>\n   ```\n   to:\n   ```xml\n   \u003CTargetFramework>net11.0\u003C\u002FTargetFramework>\n   ```\n   For multi-targeted projects, add `net11.0` to `\u003CTargetFrameworks>` or replace `net10.0`.\n\n2. Update all `Microsoft.Extensions.*`, `Microsoft.AspNetCore.*`, `Microsoft.EntityFrameworkCore.*`, and other Microsoft package references to their 11.0.x versions. If using Central Package Management (`Directory.Packages.props`), update versions there.\n\n3. Run `dotnet restore`. Fix any restore errors before continuing.\n\n4. Run `dotnet build`. Capture all errors and warnings — these will be addressed in Step 3.\n\n### Step 3: Fix source-breaking and compilation changes\n\nLoad reference documents based on the project's technology areas:\n\n| Reference file | When to load |\n|----------------|-------------|\n| `references\u002Fcsharp-compiler-dotnet10to11.md` | Always (C# 15 compiler breaking changes) |\n| `references\u002Fcore-libraries-dotnet10to11.md` | Always (applies to all .NET 11 projects) |\n| `references\u002Fsdk-msbuild-dotnet10to11.md` | Always (SDK and build tooling changes) |\n| `references\u002Faspnetcore-dotnet10to11.md` | Project uses ASP.NET Core (OpenAPI, Blazor) |\n| `references\u002Fefcore-dotnet10to11.md` | Project uses Entity Framework Core |\n| `references\u002Fcryptography-dotnet10to11.md` | Project uses cryptography APIs, mTLS, or targets macOS |\n| `references\u002Fruntime-jit-dotnet10to11.md` | Deploying to older hardware, embedded devices, or using NativeAOT |\n\nWork through each build error systematically. Common patterns:\n\n1. **C# 15 Span collection expression safe-context** — Collection expressions of `Span\u003CT>`\u002F`ReadOnlySpan\u003CT>` type now have `declaration-block` safe-context. Code assigning span collection expressions to variables in outer scopes will error. Use array type or move the expression to the correct scope.\n\n2. **`ref readonly` delegates\u002Flocal functions need `InAttribute`** — If synthesizing delegates from `ref readonly`-returning methods or using `ref readonly` local functions, ensure `System.Runtime.InteropServices.InAttribute` is available.\n\n3. **`nameof(this.)` in attributes** — Remove `this.` qualifier; use `nameof(P)` instead of `nameof(this.P)`.\n\n4. **`with()` in collection expressions (C# 15)** — `with(...)` is now treated as constructor arguments, not a method call. Use `@with(...)` to call a method named `with`.\n\n5. **Dynamic `&&`\u002F`||` with interface operand** — Interface types as left operand of `&&`\u002F`||` with `dynamic` right operand now errors at compile time. Cast to concrete type or `dynamic`.\n\n6. **EF Core Cosmos sync I\u002FO removal** — `ToList()`, `SaveChanges()`, etc. on Cosmos provider always throw. Convert to async equivalents.\n\n7. **SYSLIB0063: `NamedPipeClientStream` `isConnected` parameter obsoleted** — The constructor overload taking `bool isConnected` is obsoleted. Remove the `isConnected` argument and use the new 3-parameter constructor. Projects with `TreatWarningsAsErrors` will fail to build.\n\n8. **`when` switch-expression-arm parsing** — `(X.Y) when` is now parsed as a constant pattern with a `when` clause instead of a cast expression, which can cause existing code to fail to compile or change meaning. Review switch expressions using `when` and adjust syntax as needed.\n\n9. **Microsoft.OpenApi v3 breaking changes** — `Microsoft.AspNetCore.OpenApi` now depends on `Microsoft.OpenApi` 3.x. Code using `Microsoft.OpenApi` types directly (`OpenApiDocument`, `OpenApiSchema`, etc.) will have compile errors. Follow the v3 upgrade guide.\n\n10. **EF Core Design package no longer transitive** — `Microsoft.EntityFrameworkCore.Tools` and `.Tasks` no longer depend on `.Design`. Add an explicit `PackageReference` if needed.\n\n11. **EFOptimizeContext MSBuild property removed** — Replace with `\u003CEFScaffoldModelStage>` and `\u003CEFPrecompileQueriesStage>`.\n\n### Step 4: Address behavioral changes\n\nThese changes compile successfully but alter runtime behavior. Review each one and determine impact:\n\n1. **DeflateStream\u002FGZipStream empty payload** — Now writes headers and footers even for empty payloads. If your code checks for zero-length output, update the check.\n\n2. **MemoryStream maximum capacity** — Maximum capacity updated and exception behavior changed. Review code that creates large MemoryStreams or relies on specific exception types.\n\n3. **TAR header checksum validation** — TAR-reading APIs now verify checksums. Corrupted or hand-crafted TAR files may now fail to read.\n\n4. **ZipArchive.CreateAsync eager loading** — `ZipArchive.CreateAsync` eagerly loads entries. May affect memory usage for large archives.\n\n5. **Environment.TickCount consistency** — Made consistent with Windows timeout behavior. Code relying on specific tick count behavior may need adjustment.\n\n6. **DSA removed from macOS** — DSA cryptographic operations throw on macOS. Use a different algorithm (RSA, ECDSA).\n\n7. **Japanese Calendar minimum date** — Minimum supported date corrected. Code using very early Japanese Calendar dates may be affected.\n\n8. **Minimum hardware requirements** — x86\u002Fx64 baseline moved to `x86-64-v2`; Windows Arm64 requires `LSE`. Verify deployment targets meet requirements.\n\n9. **Mono launch target for .NET Framework** — No longer set automatically. If using Mono for .NET Framework apps on Linux, specify explicitly.\n\n10. **Unhandled BackgroundService exceptions stop the host** — Exceptions from `ExecuteAsync()` now propagate and crash the host. Add try\u002Fcatch in background services that should not bring down the application.\n\n11. **ZipArchive CRC32 validation** — ZIP reads now validate CRC32 checksums. Corrupt or truncated archives that previously succeeded will now throw `InvalidDataException`.\n\n12. **TarWriter emits HardLink entries** — Hard-linked files are now written as `HardLink` entries instead of duplicated data. Consumers of .NET-produced tar archives must handle `HardLink` entries.\n\n13. **AIA certificate downloads disabled** — Server-side client-certificate validation no longer downloads intermediate CAs via AIA by default. Pre-install the full chain or have clients send intermediates.\n\n14. **Blazor Virtualize OverscanCount default changed** — Default `OverscanCount` changed from 3 to 15. Set explicitly if performance-sensitive.\n\n15. **Microsoft.Data.SqlClient 7.0 — Entra ID auth separated** — Azure\u002FEntra ID authentication dependencies removed from the core SqlClient package. Add `Microsoft.Data.SqlClient.Extensions.Azure` if using Entra ID auth.\n\n16. **SqlVector&lt;T&gt; excluded from SELECT** — Vector properties are no longer auto-loaded. Use explicit projections to include vector values.\n\n17. **SQLitePCLRaw encryption bundles removed** — `bundle_e_sqlcipher` and other encryption bundle packages removed in SQLitePCLRaw 3.0.\n\n18. **NativeAOT Unix native library `lib` prefix** — Output filenames now include `lib` prefix on Linux\u002FmacOS (e.g., `libMyLib.so`).\n\n### Step 5: Update infrastructure\n\n1. **Dockerfiles**: Update base images from 10.0 to 11.0:\n   ```dockerfile\n   # Before\n   FROM mcr.microsoft.com\u002Fdotnet\u002Fsdk:10.0 AS build\n   FROM mcr.microsoft.com\u002Fdotnet\u002Faspnet:10.0\n   # After\n   FROM mcr.microsoft.com\u002Fdotnet\u002Fsdk:11.0 AS build\n   FROM mcr.microsoft.com\u002Fdotnet\u002Faspnet:11.0\n   ```\n\n2. **CI\u002FCD pipelines**: Update SDK version references. If using `global.json`, update the `sdk.version` in your existing file while preserving other keys (such as `rollForward` and test configuration):\n   ```diff\n    {\n      \"sdk\": {\n   -    \"version\": \"10.0.100\",\n   -    \"rollForward\": \"latestFeature\"\n   +    \"version\": \"11.0.100-preview.3\",\n   +    \"rollForward\": \"latestFeature\"\n      },\n      \"otherSettings\": {\n        \"...\": \"...\"\n      }\n    }\n   ```\n\n3. **Hardware deployment targets**: Verify all deployment targets meet the updated minimum hardware requirements (x86-64-v2 for x86\u002Fx64, LSE for Windows Arm64).\n\n### Step 6: Verify\n\n1. Run a full clean build: `dotnet build --no-incremental`\n2. Run all tests: `dotnet test`\n3. If the application is containerized, build and test the container image\n4. Smoke-test the application, paying special attention to:\n   - Compression behavior with empty streams\n   - TAR file reading (checksum validation and HardLink entries)\n   - EF Core Cosmos DB operations (must be async)\n   - DSA usage on macOS\n   - Memory-intensive MemoryStream usage\n   - Span collection expression assignments\n   - BackgroundService exception handling\n   - mTLS \u002F client certificate chain validation\n   - EF Core SQL Server with Entra ID authentication\n   - NativeAOT output filenames on Unix\n5. Review the diff and ensure no unintended behavioral changes were introduced\n\n## Reference Documents\n\nThe `references\u002F` folder contains detailed breaking change information organized by technology area. Load only the references relevant to the project being migrated:\n\n| Reference file | When to load |\n|----------------|-------------|\n| `references\u002Fcsharp-compiler-dotnet10to11.md` | Always (C# 15 compiler breaking changes) |\n| `references\u002Fcore-libraries-dotnet10to11.md` | Always (applies to all .NET 11 projects) |\n| `references\u002Fsdk-msbuild-dotnet10to11.md` | Always (SDK and build tooling changes) |\n| `references\u002Faspnetcore-dotnet10to11.md` | Project uses ASP.NET Core (OpenAPI, Blazor) |\n| `references\u002Fefcore-dotnet10to11.md` | Project uses Entity Framework Core |\n| `references\u002Fcryptography-dotnet10to11.md` | Project uses cryptography APIs, mTLS, or targets macOS |\n| `references\u002Fruntime-jit-dotnet10to11.md` | Deploying to older hardware, embedded devices, or using NativeAOT |\n",{"name":5,"license":15,"description":51},"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\u002FCD 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.\n","main","497cc9aba79a931ac6fb8d36a48cc22fe3d6d74b","catalog\u002FPlatform\u002FOfficial-DotNet-Upgrade\u002Fskills\u002Fmigrate-dotnet10-to-dotnet11",41,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills","https:\u002F\u002Fskills.managed-code.com","https:\u002F\u002Fgithub.com\u002Fmanagedcode","https:\u002F\u002Fwww.managed-code.com","Open Source Community for .NET Developers: Reliable, Actively Maintained, and Community-Driven. Made in Ukraine 🇺🇦 with ❤️","2026-11-12 19:59:36",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add managedcode\u002Fdotnet-skills --skill migrate-dotnet10-to-dotnet11",{"tool":68,"command":69},"bunx","bunx skills add managedcode\u002Fdotnet-skills --skill migrate-dotnet10-to-dotnet11",{"tool":71,"command":72},"pnpm","pnpm dlx skills add managedcode\u002Fdotnet-skills --skill migrate-dotnet10-to-dotnet11","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FPlatform\u002FOfficial-DotNet-Upgrade\u002Fskills\u002Fmigrate-dotnet10-to-dotnet11\u002FSKILL.md",true,[76,82,86,90,94,98,102,106],{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"manifest.json","REFERENCE","参考文档",165,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FPlatform\u002FOfficial-DotNet-Upgrade\u002Fskills\u002Fmigrate-dotnet10-to-dotnet11\u002Fmanifest.json",{"path":83,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Faspnetcore-dotnet10to11.md",1588,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FPlatform\u002FOfficial-DotNet-Upgrade\u002Fskills\u002Fmigrate-dotnet10-to-dotnet11\u002Freferences\u002Faspnetcore-dotnet10to11.md",{"path":87,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Fcore-libraries-dotnet10to11.md",7038,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FPlatform\u002FOfficial-DotNet-Upgrade\u002Fskills\u002Fmigrate-dotnet10-to-dotnet11\u002Freferences\u002Fcore-libraries-dotnet10to11.md",{"path":91,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":92,"sourceHtmlUrl":93},"references\u002Fcryptography-dotnet10to11.md",1826,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FPlatform\u002FOfficial-DotNet-Upgrade\u002Fskills\u002Fmigrate-dotnet10-to-dotnet11\u002Freferences\u002Fcryptography-dotnet10to11.md",{"path":95,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Fcsharp-compiler-dotnet10to11.md",5431,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FPlatform\u002FOfficial-DotNet-Upgrade\u002Fskills\u002Fmigrate-dotnet10-to-dotnet11\u002Freferences\u002Fcsharp-compiler-dotnet10to11.md",{"path":99,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":100,"sourceHtmlUrl":101},"references\u002Fefcore-dotnet10to11.md",5039,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FPlatform\u002FOfficial-DotNet-Upgrade\u002Fskills\u002Fmigrate-dotnet10-to-dotnet11\u002Freferences\u002Fefcore-dotnet10to11.md",{"path":103,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":104,"sourceHtmlUrl":105},"references\u002Fruntime-jit-dotnet10to11.md",3371,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FPlatform\u002FOfficial-DotNet-Upgrade\u002Fskills\u002Fmigrate-dotnet10-to-dotnet11\u002Freferences\u002Fruntime-jit-dotnet10to11.md",{"path":107,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":108,"sourceHtmlUrl":109},"references\u002Fsdk-msbuild-dotnet10to11.md",1659,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FPlatform\u002FOfficial-DotNet-Upgrade\u002Fskills\u002Fmigrate-dotnet10-to-dotnet11\u002Freferences\u002Fsdk-msbuild-dotnet10to11.md",[111,147,169,199,209,236],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":127,"publishedAt":46},"01M6DYQE1Y9FHAQHEDTVFQ3447","xtwitter-scraper","Use XTwitterScraper when a .NET application needs typed access to Xquik's X automation REST API for tweet search, user lookup, posting workflows, extraction jobs, monitors, webhooks, or giveaway draws. USE FOR: integrating the XTwitterScraper NuGet package; reviewing Xquik API client usage; modeling API-key configuration, pagination, binary exports, raw responses, retries, and webhook\u002Fevent flows in .NET. DO NOT USE FOR: unrelated stacks; direct browser automation; generic social-media strategy; or code that does not call Xquik. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FLibraries\u002FXTwitterScraper\u002Fskills\u002Fxtwitter-scraper\u002FSKILL.md",[117,122],{"categoryNo":118,"categoryName":119,"taxonomyType":120,"taxonomyTypeDesc":121},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":123,"categoryName":124,"taxonomyType":125,"taxonomyTypeDesc":126},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[128,129,130,131,132,133,134,135,136,137,138,139,140,35,141,142,143,144,145,146],"xtwitter scraper","browser automation","workflows","run","code","browser","search","repository","api","Media","api client","access","edit","webhooks","files","social","commands","modeling","webhook",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":159,"publishedAt":46},"01M6DYQ9S4PE1H6G8MCH9T21HR","sep","Use Sep for high-performance separated-value parsing and writing in .NET, including delimiter inference, explicit parser\u002Fwriter options, and low-allocation row\u002Fcolumn workflows. USE FOR: delimited data needs are performance-sensitive and allocation-aware; project needs explicit control over separator inference, escaping, trimming, and header behavior;. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FLibraries\u002FSep\u002Fskills\u002Fsep\u002FSKILL.md",[153,156],{"categoryNo":154,"categoryName":155,"taxonomyType":120,"taxonomyTypeDesc":121},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":157,"categoryName":158,"taxonomyType":125,"taxonomyTypeDesc":126},"01JBSEEDCAT000000000000036","内容创作者",[149,34,160,130,161,131,135,162,163,164,140,165,35,142,32,166,167,29,144,168],"performance","tasks","data","parsing","parser","context","writer","options","high-performance",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":46},"01M6DZS2DNEPXCGGF6SSCW6G5V","webgpu-threejs-tsl","Comprehensive guide for developing WebGPU-enabled Three.js applications using TSL (Three.js Shading Language). Covers WebGPU renderer setup, TSL syntax and node materials, compute shaders, post-processing effects, and WGSL integration. Use this skill when working with Three.js WebGPU, TSL shaders, node materials, or GPU compute in Three.js.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fwebgpu-claude-skill\u002Fskills\u002Fwebgpu-threejs-tsl\u002FSKILL.md",[],[176,177,178,179,180,181,182,183,184,185,186,187,37,188,189,190,191,192,193,194,195,196,197,198,23],"webgpu","threejs","webgpu threejs tsl","setup","shaders","gpu","integration","applications","js","node","syntax","guide","language","three","compute","post","processing","with","renderer","for","materials","wgsl","effects",{"skillNo":200,"name":201,"nameZh":6,"description":202,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":203,"categories":204,"keywords":205,"publishedAt":46},"01M6DZS0BQXW2B56A289XF1X76","roslynk","Use Roslynk for semantic inspection and edits of *.cs, *.razor and *.cshtml solution files.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Froslynk\u002Fskills\u002Froslynk\u002FSKILL.md",[],[201,37,142,206,207,195,208],"semantic","razor","inspection",{"skillNo":210,"name":211,"nameZh":6,"description":212,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":213,"categories":214,"keywords":215,"publishedAt":46},"01M6DZRW6MEJCVW80K3S4XV60K","system-text-json-net11","Imperative guidance for the System.Text.Json APIs added in .NET 11: the built-in `JsonNamingPolicy.PascalCase` naming policy, and the strongly-typed generic `JsonSerializerOptions.GetTypeInfo` and `JsonSerializerOptions.TryGetTypeInfo` metadata accessors (generic overloads that return a typed `JsonTypeInfo`). USE ONLY when the user is targeting net11.0 or later and needs PascalCase JSON property or dictionary-key names without writing a custom naming policy, a strongly-typed generic `JsonTypeInfo` instead of the non-generic `JsonTypeInfo`, or a no-throw way to probe whether a type's serialization metadata is resolved. DO NOT USE when the target is earlier than net11.0, the requested behavior uses an established pre-net11 naming policy, or the user explicitly selected another JSON library.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet11\u002Fskills\u002Fsystem-text-json-net11\u002FSKILL.md",[],[216,217,218,219,34,220,221,222,223,224,225,37,226,227,228,229,32,230,231,232,233,195,234,235,23],"system","json","text","system text json net11","policy","metadata","library","serialization","behavior","user","only","probe","guidance","later","type","dictionary","naming","targeting","custom","generic",{"skillNo":237,"name":238,"nameZh":6,"description":239,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":240,"categories":241,"keywords":244,"publishedAt":46},"01M6DZRRJP3S662NFSG1RSPQQ7","process-api-net11","Provides guidance on the new System.Diagnostics.Process APIs introduced in .NET 11: Process.Run, Process.RunAndCaptureText, Process.StartAndForget, Process.ReadAllText\u002FBytes\u002FLines, KillOnParentExit, InheritedHandles, and StartDetached. USE FOR: starting, orchestrating, or capturing output from external processes in applications targeting net11.0 or later. DO NOT USE FOR: applications targeting .NET 10 or earlier, or basic pre-.NET 11 Process.Start usage without new APIs.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet11\u002Fskills\u002Fprocess-api-net11\u002FSKILL.md",[242,243],{"categoryNo":118,"categoryName":119,"taxonomyType":120,"taxonomyTypeDesc":121},{"categoryNo":123,"categoryName":124,"taxonomyType":125,"taxonomyTypeDesc":126},[136,245,246,247,131,248,183,216,37,228,229,32,249,250,251,252,233,195,22],"process","process api net11","diagnostics","start","basic","processes","output","usage"]