migrate-dotnet10-to-dotnet11

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

.NET 10 → .NET 11 Migration

.NET 10 迁移至 .NET 11

Migrate 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.
Note: .NET 11 is currently in preview. This skill covers breaking changes documented through Preview 3.
将.NET 10项目或解决方案迁移至.NET 11,系统性解决所有重大变更问题。最终成果是一个目标框架为
net11.0
的项目,可正常构建、通过测试,并适配.NET 11引入的所有行为变更、源代码不兼容及二进制不兼容问题。
注意: .NET 11目前处于预览阶段。本技能涵盖预览版3之前已记录的所有重大变更。

When to Use

适用场景

  • Upgrading
    TargetFramework
    from
    net10.0
    to
    net11.0
  • Resolving build errors or new warnings after updating the .NET 11 SDK
  • Adapting to behavioral changes in .NET 11 runtime, ASP.NET Core 11, or EF Core 11
  • Updating CI/CD pipelines, Dockerfiles, or deployment scripts for .NET 11
  • Fixing C# 15 compiler breaking changes after SDK upgrade
  • TargetFramework
    net10.0
    升级至
    net11.0
  • 更新.NET 11 SDK后解决构建错误或新出现的警告
  • 适配.NET 11运行时、ASP.NET Core 11或EF Core 11的行为变更
  • 为.NET 11更新CI/CD流水线、Dockerfile或部署脚本
  • SDK升级后修复C# 15编译器的重大变更问题

When Not to Use

不适用场景

  • The project already targets
    net11.0
    and builds cleanly — migration is done
  • Upgrading from .NET 9 or earlier — address the .NET 9→10 breaking changes first
  • Migrating from .NET Framework — that is a separate, larger effort
  • Greenfield projects that start on .NET 11 (no migration needed)
  • 项目已目标
    net11.0
    且可正常构建——迁移已完成
  • 从.NET 9或更早版本升级——需先处理.NET 9→10的重大变更
  • 从.NET Framework迁移——这是一项独立且更复杂的工作
  • 基于.NET 11的全新项目开发(无需迁移)

Inputs

输入项

InputRequiredDescription
Project or solution pathYesThe
.csproj
,
.sln
, or
.slnx
entry point to migrate
Build commandNoHow to build (e.g.,
dotnet build
, a repo build script). Auto-detect if not provided
Test commandNoHow to run tests (e.g.,
dotnet test
). Auto-detect if not provided
Project type hintsNoWhether the project uses ASP.NET Core, EF Core, Cosmos DB, etc. Auto-detect from PackageReferences and SDK attributes if not provided
输入项是否必填描述
项目或解决方案路径待迁移的
.csproj
.sln
.slnx
入口文件
构建命令构建方式(如
dotnet build
、仓库构建脚本)。未提供时自动检测
测试命令测试运行方式(如
dotnet test
)。未提供时自动检测
项目类型提示项目是否使用ASP.NET Core、EF Core、Cosmos DB等。未提供时通过PackageReferences和SDK属性自动检测

Workflow

工作流程

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.
关于.NET 11重大变更的信息,请直接从已加载的参考文档中获取。 可根据需要检查本地仓库(项目/解决方案文件、源代码、配置、构建/测试脚本)以确定适用的变更。请勿从网页或其他外部来源获取重大变更信息——已加载的参考文档为权威来源。重点在于识别适用的重大变更并提供具体修复方案。
提交策略: 在每个逻辑节点提交代码——更新目标框架(步骤2)后、解决构建错误(步骤3)后、处理行为变更(步骤4)后、更新基础设施(步骤5)后。确保每次提交聚焦明确,便于评审。

Step 1: Assess the project

步骤1:评估项目

  1. Identify how the project is built and tested. Look for build scripts,
    .sln
    /
    .slnx
    files, or individual
    .csproj
    files.
  2. Run
    dotnet --version
    to confirm the .NET 11 SDK is installed. If it is not, stop and inform the user.
  3. Determine which technology areas the project uses by examining:
    • SDK attribute:
      Microsoft.NET.Sdk.Web
      → ASP.NET Core;
      Microsoft.NET.Sdk.WindowsDesktop
      with
      <UseWPF>
      or
      <UseWindowsForms>
      → WPF/WinForms
    • PackageReferences:
      Microsoft.EntityFrameworkCore.*
      → EF Core;
      Microsoft.EntityFrameworkCore.Cosmos
      → Cosmos DB provider
    • Dockerfile presence → Container changes relevant
    • Cryptography API usage → DSA on macOS affected; AIA cert download changes relevant
    • Compression API usage → DeflateStream/GZipStream/ZipArchive changes relevant
    • TAR API usage → Header checksum validation and HardLink entry changes relevant
    • NamedPipeClientStream
      usage with
      SafePipeHandle
      → SYSLIB0063 constructor obsoletion relevant
    • BackgroundService
      usage
      → Unhandled exceptions now stop the host
    • Microsoft.OpenApi
      direct usage
      → v3 API breaking changes in ASP.NET Core OpenAPI
    • EF Core SQL Server with Entra ID auth → SqlClient 7.0 auth dependency changes
    • NativeAOT native libraries on Unix → Output filename prefix changed
  4. Record which reference documents are relevant (see the reference loading table in Step 3).
  5. Do a clean build (
    dotnet build --no-incremental
    or delete
    bin
    /
    obj
    ) on the current
    net10.0
    target to establish a clean baseline. Record any pre-existing warnings.
  1. 确定项目的构建和测试方式。查找构建脚本、
    .sln
    /
    .slnx
    文件或单个
    .csproj
    文件。
  2. 运行
    dotnet --version
    确认已安装.NET 11 SDK。若未安装,停止操作并告知用户。
  3. 通过以下方式确定项目使用的技术领域:
    • SDK属性
      Microsoft.NET.Sdk.Web
      → ASP.NET Core;
      Microsoft.NET.Sdk.WindowsDesktop
      搭配
      <UseWPF>
      <UseWindowsForms>
      → WPF/WinForms
    • PackageReferences
      Microsoft.EntityFrameworkCore.*
      → EF Core;
      Microsoft.EntityFrameworkCore.Cosmos
      → Cosmos DB提供程序
    • Dockerfile存在性 → 需关注容器相关变更
    • 加密API使用情况 → macOS上的DSA受影响;AIA证书下载变更适用
    • 压缩API使用情况 → DeflateStream/GZipStream/ZipArchive变更适用
    • TAR API使用情况 → 头部校验和验证与HardLink条目变更适用
    • NamedPipeClientStream
      搭配
      SafePipeHandle
      使用
      → SYSLIB0063构造函数弃用相关
    • BackgroundService
      使用情况
      → 未处理的异常现在会停止宿主
    • Microsoft.OpenApi
      直接使用
      → ASP.NET Core OpenAPI中的v3 API重大变更
    • EF Core SQL Server搭配Entra ID认证 → SqlClient 7.0认证依赖变更
    • Unix上的NativeAOT原生库 → 输出文件名前缀已更改
  4. 记录适用的参考文档(见步骤3中的参考加载表)。
  5. 在当前
    net10.0
    目标上执行清理构建
    dotnet build --no-incremental
    或删除
    bin
    /
    obj
    目录),建立干净的基线。记录所有预先存在的警告。

Step 2: Update the Target Framework

步骤2:更新目标框架

  1. In each
    .csproj
    (or
    Directory.Build.props
    if centralized), change:
    xml
    <TargetFramework>net10.0</TargetFramework>
    to:
    xml
    <TargetFramework>net11.0</TargetFramework>
    For multi-targeted projects, add
    net11.0
    to
    <TargetFrameworks>
    or replace
    net10.0
    .
  2. 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.
  3. Run
    dotnet restore
    . Fix any restore errors before continuing.
  4. Run
    dotnet build
    . Capture all errors and warnings — these will be addressed in Step 3.
  1. 在每个
    .csproj
    (或集中管理的
    Directory.Build.props
    )中,将:
    xml
    <TargetFramework>net10.0</TargetFramework>
    修改为:
    xml
    <TargetFramework>net11.0</TargetFramework>
    对于多目标项目,将
    net11.0
    添加到
    <TargetFrameworks>
    中或替换
    net10.0
  2. 将所有
    Microsoft.Extensions.*
    Microsoft.AspNetCore.*
    Microsoft.EntityFrameworkCore.*
    及其他Microsoft包引用更新至11.0.x版本。若使用集中包管理(
    Directory.Packages.props
    ),在该文件中更新版本。
  3. 运行
    dotnet restore
    。继续操作前修复所有还原错误。
  4. 运行
    dotnet build
    。捕获所有错误和警告——这些将在步骤3中处理。

Step 3: Fix source-breaking and compilation changes

步骤3:修复源代码兼容与编译变更

Load reference documents based on the project's technology areas:
Reference fileWhen to load
references/csharp-compiler-dotnet10to11.md
Always (C# 15 compiler breaking changes)
references/core-libraries-dotnet10to11.md
Always (applies to all .NET 11 projects)
references/sdk-msbuild-dotnet10to11.md
Always (SDK and build tooling changes)
references/aspnetcore-dotnet10to11.md
Project uses ASP.NET Core (OpenAPI, Blazor)
references/efcore-dotnet10to11.md
Project uses Entity Framework Core
references/cryptography-dotnet10to11.md
Project uses cryptography APIs, mTLS, or targets macOS
references/runtime-jit-dotnet10to11.md
Deploying to older hardware, embedded devices, or using NativeAOT
Work through each build error systematically. Common patterns:
  1. C# 15 Span collection expression safe-context — Collection expressions of
    Span<T>
    /
    ReadOnlySpan<T>
    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.
  2. ref readonly
    delegates/local functions need
    InAttribute
    — If synthesizing delegates from
    ref readonly
    -returning methods or using
    ref readonly
    local functions, ensure
    System.Runtime.InteropServices.InAttribute
    is available.
  3. nameof(this.)
    in attributes
    — Remove
    this.
    qualifier; use
    nameof(P)
    instead of
    nameof(this.P)
    .
  4. 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
    .
  5. Dynamic
    &&
    /
    ||
    with interface operand
    — Interface types as left operand of
    &&
    /
    ||
    with
    dynamic
    right operand now errors at compile time. Cast to concrete type or
    dynamic
    .
  6. EF Core Cosmos sync I/O removal
    ToList()
    ,
    SaveChanges()
    , etc. on Cosmos provider always throw. Convert to async equivalents.
  7. 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.
  8. 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.
  9. 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.
  10. EF Core Design package no longer transitive
    Microsoft.EntityFrameworkCore.Tools
    and
    .Tasks
    no longer depend on
    .Design
    . Add an explicit
    PackageReference
    if needed.
  11. EFOptimizeContext MSBuild property removed — Replace with
    <EFScaffoldModelStage>
    and
    <EFPrecompileQueriesStage>
    .
根据项目的技术领域加载参考文档:
参考文件加载场景
references/csharp-compiler-dotnet10to11.md
始终加载(C# 15编译器重大变更)
references/core-libraries-dotnet10to11.md
始终加载(适用于所有.NET 11项目)
references/sdk-msbuild-dotnet10to11.md
始终加载(SDK与构建工具变更)
references/aspnetcore-dotnet10to11.md
项目使用ASP.NET Core(OpenAPI、Blazor)
references/efcore-dotnet10to11.md
项目使用Entity Framework Core
references/cryptography-dotnet10to11.md
项目使用加密API、mTLS或目标平台为macOS
references/runtime-jit-dotnet10to11.md
部署至老旧硬件、嵌入式设备或使用NativeAOT
系统性处理每个构建错误。常见模式:
  1. C# 15 Span集合表达式安全上下文 ——
    Span<T>
    /
    ReadOnlySpan<T>
    类型的集合表达式现在具有
    declaration-block
    安全上下文。将span集合表达式赋值给外部作用域变量的代码会报错。使用数组类型或将表达式移至正确作用域。
  2. ref readonly
    委托/局部函数需要
    InAttribute
    —— 若从返回
    ref readonly
    的方法合成委托或使用
    ref readonly
    局部函数,确保
    System.Runtime.InteropServices.InAttribute
    可用。
  3. 属性中的
    nameof(this.)
    —— 移除
    this.
    限定符;使用
    nameof(P)
    替代
    nameof(this.P)
  4. 集合表达式中的
    with()
    (C# 15)
    ——
    with(...)
    现在被视为构造函数参数,而非方法调用。调用名为
    with
    的方法时使用
    @with(...)
  5. 动态
    &&
    /
    ||
    搭配接口操作数
    —— 接口类型作为
    &&
    /
    ||
    的左操作数且右侧为
    dynamic
    时,现在会在编译时报错。转换为具体类型或
    dynamic
  6. EF Core Cosmos同步I/O移除 —— Cosmos提供程序上的
    ToList()
    SaveChanges()
    等方法始终会抛出异常。转换为异步等效方法。
  7. SYSLIB0063:
    NamedPipeClientStream
    isConnected
    参数已弃用
    —— 接受
    bool isConnected
    参数的构造函数重载已被弃用。移除
    isConnected
    参数并使用新的3参数构造函数。开启
    TreatWarningsAsErrors
    的项目将无法构建。
  8. when
    开关表达式分支解析
    ——
    (X.Y) when
    现在被解析为带有
    when
    子句的常量模式,而非强制转换表达式,这可能导致现有代码无法编译或改变语义。检查使用
    when
    的开关表达式并根据需要调整语法。
  9. Microsoft.OpenApi v3重大变更 ——
    Microsoft.AspNetCore.OpenApi
    现在依赖
    Microsoft.OpenApi
    3.x。直接使用
    Microsoft.OpenApi
    类型(
    OpenApiDocument
    OpenApiSchema
    等)的代码会出现编译错误。遵循v3升级指南。
  10. EF Core Design包不再作为传递依赖 ——
    Microsoft.EntityFrameworkCore.Tools
    .Tasks
    不再依赖
    .Design
    。若需要,添加显式的
    PackageReference
  11. EFOptimizeContext MSBuild属性已移除 —— 替换为
    <EFScaffoldModelStage>
    <EFPrecompileQueriesStage>

Step 4: Address behavioral changes

步骤4:处理行为变更

These changes compile successfully but alter runtime behavior. Review each one and determine impact:
  1. DeflateStream/GZipStream empty payload — Now writes headers and footers even for empty payloads. If your code checks for zero-length output, update the check.
  2. MemoryStream maximum capacity — Maximum capacity updated and exception behavior changed. Review code that creates large MemoryStreams or relies on specific exception types.
  3. TAR header checksum validation — TAR-reading APIs now verify checksums. Corrupted or hand-crafted TAR files may now fail to read.
  4. ZipArchive.CreateAsync eager loading
    ZipArchive.CreateAsync
    eagerly loads entries. May affect memory usage for large archives.
  5. Environment.TickCount consistency — Made consistent with Windows timeout behavior. Code relying on specific tick count behavior may need adjustment.
  6. DSA removed from macOS — DSA cryptographic operations throw on macOS. Use a different algorithm (RSA, ECDSA).
  7. Japanese Calendar minimum date — Minimum supported date corrected. Code using very early Japanese Calendar dates may be affected.
  8. Minimum hardware requirements — x86/x64 baseline moved to
    x86-64-v2
    ; Windows Arm64 requires
    LSE
    . Verify deployment targets meet requirements.
  9. Mono launch target for .NET Framework — No longer set automatically. If using Mono for .NET Framework apps on Linux, specify explicitly.
  10. Unhandled BackgroundService exceptions stop the host — Exceptions from
    ExecuteAsync()
    now propagate and crash the host. Add try/catch in background services that should not bring down the application.
  11. ZipArchive CRC32 validation — ZIP reads now validate CRC32 checksums. Corrupt or truncated archives that previously succeeded will now throw
    InvalidDataException
    .
  12. 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.
  13. 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.
  14. Blazor Virtualize OverscanCount default changed — Default
    OverscanCount
    changed from 3 to 15. Set explicitly if performance-sensitive.
  15. Microsoft.Data.SqlClient 7.0 — Entra ID auth separated — Azure/Entra ID authentication dependencies removed from the core SqlClient package. Add
    Microsoft.Data.SqlClient.Extensions.Azure
    if using Entra ID auth.
  16. SqlVector<T> excluded from SELECT — Vector properties are no longer auto-loaded. Use explicit projections to include vector values.
  17. SQLitePCLRaw encryption bundles removed
    bundle_e_sqlcipher
    and other encryption bundle packages removed in SQLitePCLRaw 3.0.
  18. NativeAOT Unix native library
    lib
    prefix
    — Output filenames now include
    lib
    prefix on Linux/macOS (e.g.,
    libMyLib.so
    ).
这些变更可成功编译,但会改变运行时行为。逐一检查并确定影响:
  1. DeflateStream/GZipStream空负载 —— 即使是空负载,现在也会写入头部和尾部。若代码检查零长度输出,更新检查逻辑。
  2. MemoryStream最大容量 —— 最大容量已更新,异常行为已改变。检查创建大型MemoryStream或依赖特定异常类型的代码。
  3. TAR头部校验和验证 —— TAR读取API现在会验证校验和。损坏或手工制作的TAR文件现在可能无法读取。
  4. ZipArchive.CreateAsync预加载 ——
    ZipArchive.CreateAsync
    会预加载条目。可能影响大型归档文件的内存使用。
  5. Environment.TickCount一致性 —— 已与Windows超时行为保持一致。依赖特定TickCount行为的代码可能需要调整。
  6. macOS上移除DSA —— macOS上的DSA加密操作会抛出异常。使用其他算法(RSA、ECDSA)。
  7. 日本历法最小日期 —— 修正了支持的最小日期。使用极早日本历法日期的代码可能受影响。
  8. 最低硬件要求 —— x86/x64基准已升级至
    x86-64-v2
    ;Windows Arm64需要
    LSE
    。验证部署目标满足要求。
  9. .NET Framework的Mono启动目标 —— 不再自动设置。若在Linux上使用Mono运行.NET Framework应用,需显式指定。
  10. 未处理的BackgroundService异常会停止宿主 ——
    ExecuteAsync()
    中的异常现在会传播并导致宿主崩溃。在不应导致应用崩溃的后台服务中添加try/catch。
  11. ZipArchive CRC32验证 —— ZIP读取现在会验证CRC32校验和。之前可成功读取的损坏或截断归档文件现在会抛出
    InvalidDataException
  12. TarWriter输出HardLink条目 —— 硬链接文件现在会作为
    HardLink
    条目写入,而非重复数据。使用.NET生成的tar归档文件的消费者必须处理
    HardLink
    条目。
  13. AIA证书下载已禁用 —— 服务器端客户端证书验证默认不再通过AIA下载中间CA。预安装完整证书链或让客户端发送中间证书。
  14. Blazor Virtualize OverscanCount默认值变更 —— 默认
    OverscanCount
    从3变更为15。若对性能敏感,需显式设置。
  15. Microsoft.Data.SqlClient 7.0 —— Entra ID认证分离 —— Azure/Entra ID认证依赖已从核心SqlClient包中移除。若使用Entra ID认证,添加
    Microsoft.Data.SqlClient.Extensions.Azure
  16. SqlVector<T>被排除在SELECT之外 —— 向量属性不再自动加载。使用显式投影来包含向量值。
  17. SQLitePCLRaw加密包已移除 —— SQLitePCLRaw 3.0中已移除
    bundle_e_sqlcipher
    及其他加密包。
  18. NativeAOT Unix原生库的
    lib
    前缀
    —— Linux/macOS上的输出文件名现在包含
    lib
    前缀(如
    libMyLib.so
    )。

Step 5: Update infrastructure

步骤5:更新基础设施

  1. Dockerfiles: Update base images from 10.0 to 11.0:
    dockerfile
    # 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.0
  2. CI/CD 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):
    diff
     {
       "sdk": {
    -    "version": "10.0.100",
    -    "rollForward": "latestFeature"
    +    "version": "11.0.100-preview.3",
    +    "rollForward": "latestFeature"
       },
       "otherSettings": {
         "...": "..."
       }
     }
  3. Hardware deployment targets: Verify all deployment targets meet the updated minimum hardware requirements (x86-64-v2 for x86/x64, LSE for Windows Arm64).
  1. Dockerfile:将基础镜像从10.0更新至11.0:
    dockerfile
    # 之前
    FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
    FROM mcr.microsoft.com/dotnet/aspnet:10.0
    # 之后
    FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build
    FROM mcr.microsoft.com/dotnet/aspnet:11.0
  2. CI/CD流水线:更新SDK版本引用。若使用
    global.json
    ,更新现有文件中的
    sdk.version
    ,同时保留其他键(如
    rollForward
    和测试配置):
    diff
     {
       "sdk": {
    -    "version": "10.0.100",
    -    "rollForward": "latestFeature"
    +    "version": "11.0.100-preview.3",
    +    "rollForward": "latestFeature"
       },
       "otherSettings": {
         "...": "..."
       }
     }
  3. 硬件部署目标:验证所有部署目标满足更新后的最低硬件要求(x86/x64为x86-64-v2,Windows Arm64为LSE)。

Step 6: Verify

步骤6:验证

  1. Run a full clean build:
    dotnet build --no-incremental
  2. Run all tests:
    dotnet test
  3. If the application is containerized, build and test the container image
  4. Smoke-test the application, paying special attention to:
    • Compression behavior with empty streams
    • TAR file reading (checksum validation and HardLink entries)
    • EF Core Cosmos DB operations (must be async)
    • DSA usage on macOS
    • Memory-intensive MemoryStream usage
    • Span collection expression assignments
    • BackgroundService exception handling
    • mTLS / client certificate chain validation
    • EF Core SQL Server with Entra ID authentication
    • NativeAOT output filenames on Unix
  5. Review the diff and ensure no unintended behavioral changes were introduced
  1. 执行完整清理构建:
    dotnet build --no-incremental
  2. 运行所有测试:
    dotnet test
  3. 若应用已容器化,构建并测试容器镜像
  4. 对应用进行冒烟测试,重点关注:
    • 空流的压缩行为
    • TAR文件读取(校验和验证与HardLink条目)
    • EF Core Cosmos DB操作(必须为异步)
    • macOS上的DSA使用
    • 内存密集型MemoryStream使用
    • Span集合表达式赋值
    • BackgroundService异常处理
    • mTLS / 客户端证书链验证
    • EF Core SQL Server搭配Entra ID认证
    • Unix上的NativeAOT输出文件名
  5. 检查差异,确保未引入意外的行为变更

Reference Documents

参考文档

The
references/
folder contains detailed breaking change information organized by technology area. Load only the references relevant to the project being migrated:
Reference fileWhen to load
references/csharp-compiler-dotnet10to11.md
Always (C# 15 compiler breaking changes)
references/core-libraries-dotnet10to11.md
Always (applies to all .NET 11 projects)
references/sdk-msbuild-dotnet10to11.md
Always (SDK and build tooling changes)
references/aspnetcore-dotnet10to11.md
Project uses ASP.NET Core (OpenAPI, Blazor)
references/efcore-dotnet10to11.md
Project uses Entity Framework Core
references/cryptography-dotnet10to11.md
Project uses cryptography APIs, mTLS, or targets macOS
references/runtime-jit-dotnet10to11.md
Deploying to older hardware, embedded devices, or using NativeAOT
references/
文件夹包含按技术领域分类的详细重大变更信息。仅加载与待迁移项目相关的参考文档:
参考文件加载场景
references/csharp-compiler-dotnet10to11.md
始终加载(C# 15编译器重大变更)
references/core-libraries-dotnet10to11.md
始终加载(适用于所有.NET 11项目)
references/sdk-msbuild-dotnet10to11.md
始终加载(SDK与构建工具变更)
references/aspnetcore-dotnet10to11.md
项目使用ASP.NET Core(OpenAPI、Blazor)
references/efcore-dotnet10to11.md
项目使用Entity Framework Core
references/cryptography-dotnet10to11.md
项目使用加密API、mTLS或目标平台为macOS
references/runtime-jit-dotnet10to11.md
部署至老旧硬件、嵌入式设备或使用NativeAOT