outdated
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/outdated
/outdated
What
概述
A three-layer dependency health report:
- Inventory — every per project, with TFMs and central package management awareness, via the
PackageReferenceMCP tool (no network, token-cheap).get_nuget_packages - Staleness + vulnerabilities — current vs latest stable, and known CVEs,
via the CLI.
dotnet - License screen — flags packages that moved to commercial licenses so an
innocent doesn't silently change your legal position.
dotnet outdated --upgrade
The output is a single prioritized table — vulnerabilities first, license traps
second, staleness last — with a recommended action per row.
一份三层结构的依赖健康报告:
- 包清单统计——通过MCP工具获取每个项目的所有
get_nuget_packages,支持目标框架(TFMs)和中央包管理(CPM)感知,无需联网,令牌消耗极低。PackageReference - 陈旧性与漏洞检测——通过CLI对比当前版本与最新稳定版本,并检测已知的CVE漏洞。
dotnet - 许可证筛查——标记转为商业许可证的包,避免执行这类操作时无意中改变你的法律合规状态。
dotnet outdated --upgrade
输出结果为一个按优先级排序的表格——漏洞优先,许可证陷阱次之,陈旧性最后,每行均附带建议操作。
When
适用场景
- "check for outdated packages", "package audit", "dependency health"
- Before a .NET version upgrade (pairs with Flow B)
/migrate - After inheriting an unfamiliar codebase
- Dependabot/NuGet audit warnings appeared and you want the full picture
- Periodically on long-lived projects — quarterly is a good cadence
- “检查过时包”、“包审计”、“依赖健康状况检查”
- .NET版本升级前(可搭配流程B)
/migrate - 接手陌生代码库后
- 出现Dependabot/NuGet审计警告,想要了解完整情况时
- 长期维护的项目定期执行——每季度一次是合适的频率
How
操作步骤
Step 1: Inventory (MCP, no network)
get_nuget_packages() -- whole solution
get_nuget_packages(projectFilter: "Api") -- or one projectReturns per-project .
Note — updates then belong in , not the
csproj. Flag mixed TFMs across projects while you're here.
{Name, TargetFramework, Cpm, Packages: [{Id, Version}]}Cpm: trueDirectory.Packages.propsStep 2: Staleness and vulnerabilities (CLI)
bash
dotnet list package --outdated
dotnet list package --vulnerable --include-transitiveBoth need a successful restore first. If restore fails, fix that before
auditing — a broken lock state makes version output unreliable.
Step 3: License screen
Check the inventory against the known commercial moves (full rationale in
):
knowledge/package-recommendations.md| Package | Commercial from | Free alternative |
|---|---|---|
| MediatR | 13+ (Lucky Penny, RPL) | |
| MassTransit | 9+ (v8 Apache, patches end 2026 then EOL) | Wolverine 6.x, or stay on v8 short-term |
| FluentAssertions | 8+ (v7 stays Apache, frozen) | xUnit built-in |
| AutoMapper | 15+ (Lucky Penny) | Manual mapping (kit default) or Mapperly (MIT) |
A license flag fires when the project is on the free major and a naive
"update all" would cross the boundary — that is the trap this step exists for.
Step 4: Report
One table, priority-ordered:
| Priority | Meaning | Action |
|---|---|---|
| VULNERABLE | Known CVE in current version | Update now, test, deploy |
| LICENSE | Next major crosses a commercial boundary | Pin below boundary or plan migration |
| MAJOR | Behind a major (breaking changes likely) | One at a time, release notes first |
| MINOR/PATCH | Routine drift | Batch patches; minors one at a time |
Step 5: Act (optional)
Offer to execute updates via Flow C — one package at a time,
between each. Never batch major updates:
batched failures are unattributable.
/migratedotnet build && dotnet test步骤1:包清单统计(MCP工具,无需联网)
get_nuget_packages() -- 整个解决方案
get_nuget_packages(projectFilter: "Api") -- 或单个项目返回每个项目的数据。注意表示更新需在中进行,而非csproj文件。同时可标记跨项目的混合TFMs情况。
{Name, TargetFramework, Cpm, Packages: [{Id, Version}]}Cpm: trueDirectory.Packages.props步骤2:陈旧性与漏洞检测(CLI工具)
bash
dotnet list package --outdated
dotnet list package --vulnerable --include-transitive执行这两个命令前需先成功完成还原操作。如果还原失败,需先修复问题再进行审计——锁定状态异常会导致版本输出不可靠。
步骤3:许可证筛查
将包清单与已知转为商业许可证的包进行比对(完整依据见):
knowledge/package-recommendations.md| 包名称 | 商业许可证起始版本 | 免费替代方案 |
|---|---|---|
| MediatR | 13+(Lucky Penny、RPL许可证) | |
| MassTransit | 9+(v8版本为Apache许可证,补丁支持至2026年随后停止维护) | Wolverine 6.x,或短期保留v8版本 |
| FluentAssertions | 8+(v7版本保持Apache许可证,不再更新) | xUnit内置 |
| AutoMapper | 15+(Lucky Penny许可证) | 手动映射(工具包默认)或Mapperly(MIT许可证) |
当项目使用的是免费大版本,而执行“全部更新”会跨越到商业版本边界时,会触发许可证标记——这正是此步骤要防范的陷阱。
步骤4:生成报告
生成一个按优先级排序的表格:
| 优先级 | 含义 | 建议操作 |
|---|---|---|
| VULNERABLE | 当前版本存在已知CVE漏洞 | 立即更新、测试并部署 |
| LICENSE | 下一个大版本将跨越商业许可证边界 | 锁定版本在边界以下,或规划迁移方案 |
| MAJOR | 落后一个大版本(可能存在破坏性变更) | 逐个更新,先查看发布说明 |
| MINOR/PATCH | 常规版本滞后 | 批量更新补丁版本;小版本逐个更新 |
步骤5:执行更新(可选)
可通过流程C执行更新——逐个包更新,每次更新后执行。切勿批量更新大版本:批量更新出现故障时无法定位问题根源。
/migratedotnet build && dotnet testMCP Tools Used
使用的MCP工具
- — inventory, CPM detection, TFM audit
get_nuget_packages - — verify the solution still compiles clean after updates
get_diagnostics
- ——包清单统计、CPM检测、TFMs审计
get_nuget_packages - ——验证更新后解决方案仍能正常编译
get_diagnostics
Example
示例
User: /outdated
Claude: Inventorying packages (get_nuget_packages)...
3 projects, CPM enabled (Directory.Packages.props), all net10.0.
Checking versions and CVEs...
| Package | Current | Latest | Priority | Action |
|--------------------------|---------|---------|------------|---------------------------------|
| System.Text.Json (trans.)| 10.0.2 | 10.0.10 | VULNERABLE | Update now (CVE-2026-XXXX) |
| MassTransit | 8.3.0 | 9.1.2 | LICENSE | v9 is commercial. Stay on v8 |
| | | | | (EOL end 2026) or plan Wolverine|
| Serilog.AspNetCore | 9.0.0 | 10.0.0 | MAJOR | Update alone, check sink compat |
| FluentValidation | 12.0.1 | 12.1.1 | PATCH | Batch with other patches |
1 vulnerability, 1 license trap, 1 major, 1 patch.
Want me to apply these via /migrate Flow C?用户: /outdated
Claude: 正在统计包清单(get_nuget_packages)...
3个项目,已启用CPM(Directory.Packages.props),全部基于net10.0。
正在检查版本与漏洞...
| 包名称 | 当前版本 | 最新版本 | 优先级 | 建议操作 |
|--------------------------|---------|---------|------------|---------------------------------|
| System.Text.Json (trans.)| 10.0.2 | 10.0.10 | VULNERABLE | 立即更新(CVE-2026-XXXX) |
| MassTransit | 8.3.0 | 9.1.2 | LICENSE | v9为商业版本。保留v8版本 |
| | | | |(2026年停止维护)或规划迁移至Wolverine|
| Serilog.AspNetCore | 9.0.0 | 10.0.0 | MAJOR | 单独更新,检查接收器兼容性 |
| FluentValidation | 12.0.1 | 12.1.1 | PATCH | 与其他补丁批量更新 |
1个漏洞,1个许可证陷阱,1个大版本更新,1个补丁更新。
需要我通过/migrate流程C执行这些更新吗?Related
相关内容
- — Flow C executes the updates this report recommends
/migrate - — vetted packages + licensing detail
knowledge/package-recommendations.md - — step-by-step MediatR exit
knowledge/mediatr-to-mediator-migration.md - — full pipeline after applying updates
/verify
- ——流程C可执行本报告建议的更新操作
/migrate - ——经过验证的包列表及许可证详情
knowledge/package-recommendations.md - ——MediatR迁移至Mediator的分步指南
knowledge/mediatr-to-mediator-migration.md - ——更新完成后的全流程验证
/verify