AGENT SKILL

Fabrikam 组件 v4 升级迁移

fabrikam-v4-upgrade

将 .NET 解决方案从 Fabrikam v3 组件套件迁移到 v4——执行包重命名(Fabrikam.Web.Mvc → Fabrikam.AspNetCore.Mvc、Fabrikam.Logging → Fabrikam.Diagnostics、Fabrikam.Security.Tokens → Fabrikam.Identity.Tokens),将 Fabrikam.Data 升级到 4.0,并弃用 Fabrikam.Json 改用 System.Text.Json。

License 许可
MIT
最近更新
2026-10-24
Stars
★ 0
Forks
0

01 前言 Front Matter

name
fabrikam-v4-upgrade
metadata
{ "traits": ".NET|CSharp|VisualBasic|DotNetCore", "weight": 9000, "discovery": "scenario", "importance": "high", "post-completion": { "suggest-actions": [ "generate-report" ], "suggest-scenarios": [ "fabrikam-package-audit" ] }, "scenarioTraitsSet": [ ".NET" ] }
description
Migrate a .NET solution from the Fabrikam v3 component suite to v4 — apply the package renames (Fabrikam.Web.Mvc → Fabrikam.AspNetCore.Mvc, Fabrikam.Logging → Fabrikam.Diagnostics, Fabrikam.Security.Tokens → Fabrikam.Identity.Tokens), bump Fabrikam.Data to 4.0, and drop Fabrikam.Json in favor of System.Text.Json.
requires-extension
upgrade-fabrikam

03 SKILL.md 正文

Fabrikam suite v3 → v4 migration

Migrate every project that references the Fabrikam v3 suite to v4 in one coordinated change set. Prefer mechanical, verifiable steps and build + test after each phase.

1. Establish a baseline

  1. Confirm which Fabrikam packages and versions are referenced with detect_fabrikam_packages (scans .csproj, Directory.Packages.props, and packages.config).
  2. Ensure the solution builds and there is a working test command (dotnet test). If none exists, add a smoke test before changing code.

For anything larger than a handful of projects, or whenever Fabrikam.* versions disagree across projects, delegate the dependency walk to the fabrikam-dependency-validation sub-agent rather than tracing transitive references here. It works in its own context and returns just the verdict table, so this scenario doesn't pay for the intermediate reasoning. Continue with the steps below once it reports.

2. Apply the package migration

Call plan_package_migration to get the authoritative old → new mapping, then apply it across every project and any central Directory.Packages.props:

Remove (v3) Add (v4) Notes
Fabrikam.Web.Mvc 3.x Fabrikam.AspNetCore.Mvc 4.0.0 Renamed for ASP.NET Core hosting.
Fabrikam.Data 3.x Fabrikam.Data 4.0.0 Major bump; the data API is async-only in v4.
Fabrikam.Logging 2.x Fabrikam.Diagnostics 4.0.0 Renamed and consolidated.
Fabrikam.Security.Tokens 3.x Fabrikam.Identity.Tokens 4.0.0 Renamed.
Fabrikam.Json 1.x (removed) Replaced by System.Text.Json.

3. Fix the code

  1. Update namespaces to match the renamed packages (Fabrikam.Web.Mvc → Fabrikam.AspNetCore.Mvc, Fabrikam.Logging → Fabrikam.Diagnostics, Fabrikam.Security.Tokens → Fabrikam.Identity.Tokens).
  2. Make Fabrikam.Data calls await-able — v4 removes the synchronous overloads; propagate async/await to call sites.
  3. Replace Fabrikam.Json serialization with System.Text.Json (JsonSerializer.Serialize/Deserialize).

4. Verify

  1. Restore and build the whole solution; resolve any remaining NU / CS errors.
  2. Run the full test suite.
  3. Run the application's smoke path.
  4. Generate a migration report summarizing what changed.

Notes

  • Tool names above (detect_fabrikam_packages, plan_package_migration) are the bare names exposed by the upgrade-fabrikam MCP; every host resolves them.
  • Replace the heuristics here with project-specific guidance for your suite.

04 同仓库更多 Skills

microsoft
microsoft/upgrade-agent-samples

Fabrikam 组件 v4 升级迁移

fabrikam-v4-upgrade

将 .NET 解决方案从 Fabrikam v3 组件套件迁移到 v4——应用包重命名(Fabrikam.Web.Mvc → Fabrikam.AspNetCore.Mvc、Fabrikam.Logging → Fabrikam.Diagnostics、Fabrikam.Security.Tokens → Fabrikam.Identity.Tokens),将 Fabrikam.Data 升级至 4.0,并弃用 Fabrikam.Json 改用 System.Text.Json。

软件开发工程师.NET 依赖升级与迁移
★ 0
microsoft
microsoft/upgrade-agent-samples

Fabrikam 包依赖审计

fabrikam-package-audit

审计 .NET 项目中 Fabrikam 包引用是否已为 v4 做好准备——找出 v3 时代的 Fabrikam.* 包,标记出在 v4 中被重命名、升级版本或移除的包,并给出逐个包的升级计划。在审查 .csproj、Directory.Packages.props 或 packages.config 时使用。

软件开发工程师.NET 依赖升级与迁移
★ 0
microsoft
microsoft/upgrade-agent-samples

Fabrikam 控件升级规则

fabrikam-controls-rules

Fabrikam UI 控件在 .NET 版本升级期间适用的规则——哪些 Fabrikam.Windows.Forms 版本受现代 .NET 支持、哪些必须替换而非仅重定向目标框架,以及如何记录该决策。

软件开发工程师.NET 依赖升级与迁移
★ 0
microsoft
microsoft/upgrade-agent-samples

Fabrikam 包 v4 升级审计

fabrikam-package-audit

审计 .NET 项目中 Fabrikam 包引用的 v4 就绪度——找出 v3 时代的 Fabrikam.* 包,标记出在 v4 中被重命名、提升版本或移除的包,并给出逐包的升级计划。适用于审查 .csproj、Directory.Packages.props 或 packages.config 时使用。

软件开发工程师.NET 依赖升级与迁移
★ 0
microsoft
microsoft/upgrade-agent-samples

Fabrikam控件升级规则

fabrikam-controls-rules

在 .NET 版本升级期间适用的 Fabrikam UI 控件规则——哪些 Fabrikam.Windows.Forms 版本在现代 .NET 上受支持,哪些必须替换而非重新定向(retarget),以及如何记录该决策。

软件开发工程师开发参考
★ 0