ln-822-nuget-upgrader
Upgrades .NET NuGet packages with breaking change handling
- License 许可
- MIT
- 最近更新
- 2026-05-02
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- ln-822-nuget-upgrader
- license
- MIT
- description
- Upgrades .NET NuGet packages with breaking change handling
02 资源文件 2
- 参考文档DESIGN.md1.5 KB
- 参考文档references/dotnet_version_matrix.md1.7 KB
03 SKILL.md 正文
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.
ln-822-nuget-upgrader
Type: L3 Worker Category: 8XX Optimization Parent: ln-820-dependency-optimization-coordinator
Upgrades .NET NuGet packages with automatic breaking change detection and migration.
Overview
| Aspect | Details |
|---|---|
| Input | Solution/project path |
| Output | Updated .csproj files, migration report |
| Supports | .NET 6, 7, 8, 9, 10 |
Workflow
Phases: Pre-flight → Find Projects → Security Audit → Check Outdated → Identify Breaking → Apply Upgrades → Restore & Build → Report
Phase 0: Pre-flight Checks
| Check | Required | Action if Missing |
|---|---|---|
| .csproj file(s) | Yes | Block upgrade |
| .sln file | No | Use csproj discovery instead |
| Git clean state | Yes | Block (need clean baseline for revert) |
Workers assume coordinator (ln-820) already verified git state and created backup.
Worktree & Branch Isolation
MANDATORY READ: Load shared/references/git_worktree_fallback.md — use ln-822 row.
Phase 1: Find Projects
Discovery Methods
| Method | Command |
|---|---|
| Find .csproj | Get-ChildItem -Recurse -Filter *.csproj |
| From solution | dotnet sln list |
Phase 2: Security Audit
Commands
| Check | Command |
|---|---|
| Vulnerable packages | dotnet list package --vulnerable |
| Outdated packages | dotnet list package --outdated |
Actions
| Severity | Action |
|---|---|
| Critical | Block upgrade, report |
| High | Warn, continue |
| Moderate/Low | Log only |
Phase 3: Check Outdated
Using dotnet-outdated
| Step | Command |
|---|---|
| Install tool | dotnet tool install --global dotnet-outdated-tool |
| Check | dotnet outdated --output json |
Phase 4: Identify Breaking Changes
Detection
- Compare current vs latest major versions
- Check breaking_changes_patterns.md
- Use MCP tools (see below) for migration guides
Common Breaking Changes
| Package | Breaking Version | Key Changes |
|---|---|---|
| Microsoft.EntityFrameworkCore | 8 → 9 | Query changes, migration format |
| Serilog.AspNetCore | 7 → 8 | Configuration format |
| Swashbuckle.AspNetCore | 6 → 7 | Minimal API support |
MCP Tools for Migration Search
Priority Order (Fallback Strategy)
| Priority | Tool | When to Use |
|---|---|---|
| 1 | mcp__context7__query-docs | First choice for library docs |
| 2 | mcp__Ref__ref_search_documentation | Official Microsoft docs |
| 3 | WebSearch | Latest info, community solutions |
Context7 Usage
| Step | Tool | Parameters |
|---|---|---|
| 1. Find library | mcp__context7__resolve-library-id | libraryName: "EntityFrameworkCore" |
| 2. Query docs | mcp__context7__query-docs | query: "EF Core 8 to 9 migration breaking changes" |
MCP Ref Usage
| Action | Tool | Query Example |
|---|---|---|
| Search | mcp__Ref__ref_search_documentation | "dotnet EntityFrameworkCore 9 migration guide" |
| Read | mcp__Ref__ref_read_url | URL from search results |
WebSearch Fallback
Use when Context7/Ref return no results:
"<package> .NET <version> breaking changes migration""<error code> <package> fix"
Phase 5: Apply Upgrades
Priority Order
| Priority | Package Type |
|---|---|
| 1 | SDK/Runtime (Microsoft.NET.Sdk) |
| 2 | Framework (Microsoft.AspNetCore.*) |
| 3 | EF Core (affects migrations) |
| 4 | Logging (Serilog.*) |
| 5 | Other packages |
Commands
| Action | Command |
|---|---|
| Update specific | dotnet add package <name> --version <ver> |
| Update all | dotnet outdated --upgrade |
Phase 6: Restore & Build
Commands
| Step | Command |
|---|---|
| Restore | dotnet restore |
| Build | dotnet build --configuration Release |
| Test | dotnet test |
On Failure
- Identify failing package from error
- Search Context7/Ref for migration guide
- If unresolved: rollback package, continue
Phase 7: Report Results
Report Schema
| Field | Description |
|---|---|
| solution | Solution path |
| projects[] | Updated projects |
| duration | Total time |
| upgrades[] | Applied upgrades |
| buildVerification | PASSED or FAILED |
| testResults | X passed, Y failed |
Configuration
Options:
# Upgrade scope
upgradeType: major # major | minor | patch
# Security
auditLevel: high
minimumReleaseAge: 14
# .NET specific
includePrerelease: false
targetFramework: net10.0
# Verification
runTests: true
runBuild: true
Error Handling
| Error | Cause | Solution |
|---|---|---|
| CS0246 | Missing type | Search for replacement API |
| NU1605 | Downgrade detected | Check package constraints |
| Build fail | Breaking change | Apply migration via Context7 |
References
Definition of Done
- All .csproj files discovered (via solution or recursive scan)
- Security audit completed (
dotnet list package --vulnerable) - Outdated packages identified via dotnet-outdated
- Breaking changes detected via breaking_changes_patterns.md and MCP tools
- Upgrades applied in priority order (SDK > Framework > EF Core > other)
dotnet restore,dotnet build,dotnet testall pass- Report returned with projects updated, upgrades applied, and build/test status
Version: 1.1.0 Last Updated: 2026-01-10
04 同仓库更多 Skills
zarr-python
Chunked N-D arrays for cloud storage. Compressed arrays, parallel I/O, S3/GCS integration, NumPy/Dask/Xarray compatible, for large-scale scientific computing pipelines.
zabbix
Zabbix monitoring system automation via API and Python. Use when: (1) Managing hosts, templates, items, triggers, or host groups, (2) Automating monitoring configuration, (3) Sending data via Zabbix trapper/sender, (4) Querying historical data or events, (5) Bulk operations on Zabbix objects, (6) Maintenance window management, (7) User/permission management
x-twitter-growth
X/Twitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X/Twitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.
what-if-oracle
Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like "what if...", "what would happen if...", "what are the possibilities", "explore scenarios", "scenario analysis", "possibility space", "what could go wrong", "best case / worst case", "risk analysis", "contingency planning", "strategic options", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
venue-templates
Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.