Conversation
为 net11.0 增加预览特性配置,升级部分依赖包至 preview.2 版本(如 AspNetCore、Resilience、SourceLink 等),并同步更新 Swashbuckle.AspNetCore、BenchmarkDotNetDiagnosers 等。确保项目兼容 .NET 11 最新 SDK,提升未来可维护性与兼容性。
移除 OpenTelemetry.Instrumentation.AspNetCore 包,Tracing 配置由自动注入改为手动注册 Source,Metrics 配置顺序微调。依赖更精简,追踪可控性提升,但需注意自动追踪能力变化。
Contributor
There was a problem hiding this comment.
Pull request overview
本 PR 旨在为 EasilyNET 仓库引入 .NET 11 预览的构建支持,并同步升级部分依赖包版本(含 sample 与测试/benchmark 工程),以便在新 TFM 下正常编译与运行。
Changes:
- 为
net11.0增加预览特性开关(EnablePreviewFeatures、runtime-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 管理策略一致。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 描述 (Description)
🔗 相关问题 (Related Issues)
🏷️ 变更类型 (Type of Change)
✅ 检查清单 (Checklist)
🧪 测试 (Testing)
📸 截图 (如果适用) (Screenshots (if applicable))
🔍 附加说明 (Additional Notes)