ln-822-nuget-upgrader

Upgrades .NET NuGet packages with breaking change handling. Use when updating .NET dependencies.

310 stars

Best use case

ln-822-nuget-upgrader is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Upgrades .NET NuGet packages with breaking change handling. Use when updating .NET dependencies.

Teams using ln-822-nuget-upgrader should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ln-822-nuget-upgrader/SKILL.md --create-dirs "https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/main/skills-catalog/ln-822-nuget-upgrader/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ln-822-nuget-upgrader/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ln-822-nuget-upgrader Compares

Feature / Agentln-822-nuget-upgraderStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Upgrades .NET NuGet packages with breaking change handling. Use when updating .NET dependencies.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

> **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. If `shared/` is missing, fetch files via WebFetch from `https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}`.

# ln-822-nuget-upgrader

**Type:** L3 Worker
**Category:** 8XX Optimization

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

1. Compare current vs latest major versions
2. Check [breaking_changes_patterns.md](../ln-820-dependency-optimization-coordinator/references/breaking_changes_patterns.md)
3. 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

1. Identify failing package from error
2. Search Context7/Ref for migration guide
3. 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

```yaml
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

- [breaking_changes_patterns.md](../ln-820-dependency-optimization-coordinator/references/breaking_changes_patterns.md)
- [dotnet_version_matrix.md](references/dotnet_version_matrix.md)

---

## 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 test` all pass
- [ ] Report returned with projects updated, upgrades applied, and build/test status

---

**Version:** 1.1.0
**Last Updated:** 2026-01-10

Related Skills

ln-823-pip-upgrader

310
from levnikolaevich/claude-code-skills

Upgrades Python pip/poetry/pipenv dependencies with breaking change handling. Use when updating Python dependencies.

ln-821-npm-upgrader

310
from levnikolaevich/claude-code-skills

Upgrades npm/yarn/pnpm dependencies with breaking change handling. Use when updating JavaScript/TypeScript dependencies.

ln-914-community-responder

310
from levnikolaevich/claude-code-skills

Responds to unanswered GitHub discussions and issues with codebase-informed replies. Use when clearing community question backlog.

ln-913-community-debater

310
from levnikolaevich/claude-code-skills

Launches RFC and debate discussions on GitHub. Use when proposing changes that need community input or voting.

ln-912-community-announcer

310
from levnikolaevich/claude-code-skills

Composes and publishes announcements to GitHub Discussions. Use when sharing releases, updates, or news with the community.

ln-911-github-triager

310
from levnikolaevich/claude-code-skills

Produces prioritized triage report from open GitHub issues, PRs, and discussions. Use when reviewing community backlog.

ln-910-community-engagement

310
from levnikolaevich/claude-code-skills

Analyzes community health and delegates engagement tasks. Use when managing GitHub issues, discussions, and announcements.

ln-840-benchmark-compare

310
from levnikolaevich/claude-code-skills

Runs built-in vs hex-line benchmark with scenario manifests, activation checks, and diff-based correctness. Use when measuring hex-line MCP performance against built-in tools.

ln-832-bundle-optimizer

310
from levnikolaevich/claude-code-skills

Reduces JS/TS bundle size via tree-shaking, code splitting, and unused dependency removal. Use when optimizing frontend bundle size.

ln-831-oss-replacer

310
from levnikolaevich/claude-code-skills

Replaces custom modules with OSS packages using atomic keep/discard testing. Use when migrating custom code to established libraries.

ln-830-code-modernization-coordinator

310
from levnikolaevich/claude-code-skills

Modernizes codebase via OSS replacement and bundle optimization. Use when acting on audit findings to reduce custom code.

ln-820-dependency-optimization-coordinator

310
from levnikolaevich/claude-code-skills

Upgrades dependencies across all detected package managers. Use when updating npm, NuGet, or pip packages project-wide.