Skip to content

chore: 支持 .NET 11 预览及依赖包升级#1152

Merged
joesdu merged 6 commits intomainfrom
dev
Mar 11, 2026
Merged

chore: 支持 .NET 11 预览及依赖包升级#1152
joesdu merged 6 commits intomainfrom
dev

Conversation

@joesdu
Copy link
Owner

@joesdu joesdu commented Mar 11, 2026

📝 描述 (Description)

🔗 相关问题 (Related Issues)

  • Closes #
  • Fixes #

🏷️ 变更类型 (Type of Change)

  • 🐛 错误修复 (Bug fix) (non-breaking change which fixes an issue)
  • ✨ 新功能 (New feature) (non-breaking change which adds functionality)
  • 💥 破坏性变更 (Breaking change) (fix or feature that would cause existing functionality to not work as expected)
  • 📚 文档更新 (Documentation update)
  • 🔧 重构 (Refactor) (no functional changes)
  • 🧪 测试 (Tests) (adding or updating tests)
  • 🛠️ 构建/CI 变更 (Build/CI changes)
  • 🎨 样式变更 (Style changes) (formatting, etc.)
  • 🚀 性能改进 (Performance improvements)
  • 🔒 安全改进 (Security improvements)

✅ 检查清单 (Checklist)

  • 我的代码遵循项目的编码标准 (My code follows the project's coding standards)
  • 我已经对自己的代码进行了自我审查 (I have performed a self-review of my own code)
  • 我已经在难以理解的区域注释了我的代码 (I have commented my code, particularly in hard-to-understand areas)
  • 我已经对文档进行了相应的更改 (I have made corresponding changes to the documentation)
  • 我的更改不会产生新的警告或错误 (My changes generate no new warnings or errors)
  • 我已经添加了证明我的修复有效或我的功能工作的测试 (I have added tests that prove my fix is effective or that my feature works)
  • 新增和现有的单元测试在本地通过我的更改 (New and existing unit tests pass locally with my changes)
  • 任何依赖变更都已合并并发布到下游模块 (Any dependent changes have been merged and published in downstream modules)

🧪 测试 (Testing)

  • 单元测试 (Unit tests)
  • 集成测试 (Integration tests)
  • 手动测试 (Manual testing)
  • 其他 (请指定) (Other (please specify)):

📸 截图 (如果适用) (Screenshots (if applicable))

🔍 附加说明 (Additional Notes)

joesdu added 4 commits March 11, 2026 10:17
为 net11.0 增加预览特性配置,升级部分依赖包至 preview.2 版本(如 AspNetCore、Resilience、SourceLink 等),并同步更新 Swashbuckle.AspNetCore、BenchmarkDotNetDiagnosers 等。确保项目兼容 .NET 11 最新 SDK,提升未来可维护性与兼容性。
移除 OpenTelemetry.Instrumentation.AspNetCore 包,Tracing 配置由自动注入改为手动注册 Source,Metrics 配置顺序微调。依赖更精简,追踪可控性提升,但需注意自动追踪能力变化。
Copilot AI review requested due to automatic review settings March 11, 2026 03:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

本 PR 旨在为 EasilyNET 仓库引入 .NET 11 预览的构建支持,并同步升级部分依赖包版本(含 sample 与测试/benchmark 工程),以便在新 TFM 下正常编译与运行。

Changes:

  • net11.0 增加预览特性开关(EnablePreviewFeaturesruntime-async=on)及相关告警抑制(CA2252/SYSLIB5007
  • 升级中央包版本管理中的 Microsoft 相关依赖版本
  • 调整 sample 的 OpenTelemetry Tracing 配置(AddAspNetCoreInstrumentation()AddSource("Microsoft.AspNetCore")),并升级部分包版本

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/EasilyNET.Test.Unit/EasilyNET.Test.Unit.csproj 为 net11.0 增加预览特性开关与 NoWarn 配置
test/EasilyNET.Core.Benchmark/EasilyNET.Core.Benchmark.csproj 为 net11.0 增加预览特性开关,并升级 VS Diagnosers 包版本
src/Directory.Packages.props 升级 Microsoft 相关中央包版本(DependencyModel/Resilience/SourceLink)
sample/WebApi.Test.Unit/WebApi.Test.Unit.csproj 为 net11.0 增加预览特性开关,升级若干依赖并移除 AspNetCore OTel instrumentation 包引用
sample/WebApi.Test.Unit/ServiceModules/OpenTelemetryModule.cs 调整 Tracing 配置为监听 Microsoft.AspNetCore ActivitySource
Directory.Build.props 在仓库根目录对 net11.0 统一启用预览特性与告警抑制

本次提交删除了 EasilyNET.Test.Unit.csproj 中针对 net11.0 目标框架的 EnablePreviewFeatures、Features 及 NoWarn(CA2252、SYSLIB5007)等专用配置,保持测试依赖项不变,确保项目配置与中央 TFM 管理策略一致。
@joesdu joesdu merged commit 1e5bc44 into main Mar 11, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants