Get the FREE Ultimate OpenClaw Setup Guide →

ln-712-nuget-upgrader

Scanned
npx machina-cli add skill levnikolaevich/claude-code-skills/ln-712-nuget-upgrader --openclaw
Files (1)
SKILL.md
5.8 KB

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-712-nuget-upgrader

Type: L3 Worker Category: 7XX Project Bootstrap Parent: ln-710-dependency-upgrader

Upgrades .NET NuGet packages with automatic breaking change detection and migration.


Overview

AspectDetails
InputSolution/project path
OutputUpdated .csproj files, migration report
Supports.NET 6, 7, 8, 9, 10

Workflow

See diagram.html for visual workflow.

Phases: Pre-flight → Find Projects → Security Audit → Check Outdated → Identify Breaking → Apply Upgrades → Restore & Build → Report


Phase 0: Pre-flight Checks

CheckRequiredAction if Missing
.csproj file(s)YesBlock upgrade
.sln fileNoUse csproj discovery instead

Workers assume coordinator (ln-710) already verified git state and created backup.


Phase 1: Find Projects

Discovery Methods

MethodCommand
Find .csprojGet-ChildItem -Recurse -Filter *.csproj
From solutiondotnet sln list

Phase 2: Security Audit

Commands

CheckCommand
Vulnerable packagesdotnet list package --vulnerable
Outdated packagesdotnet list package --outdated

Actions

SeverityAction
CriticalBlock upgrade, report
HighWarn, continue
Moderate/LowLog only

Phase 3: Check Outdated

Using dotnet-outdated

StepCommand
Install tooldotnet tool install --global dotnet-outdated-tool
Checkdotnet outdated --output json

Phase 4: Identify Breaking Changes

Detection

  1. Compare current vs latest major versions
  2. Check breaking_changes_patterns.md
  3. Use MCP tools (see below) for migration guides

Common Breaking Changes

PackageBreaking VersionKey Changes
Microsoft.EntityFrameworkCore8 → 9Query changes, migration format
Serilog.AspNetCore7 → 8Configuration format
Swashbuckle.AspNetCore6 → 7Minimal API support

MCP Tools for Migration Search

Priority Order (Fallback Strategy)

PriorityToolWhen to Use
1mcp__context7__query-docsFirst choice for library docs
2mcp__Ref__ref_search_documentationOfficial Microsoft docs
3WebSearchLatest info, community solutions

Context7 Usage

StepToolParameters
1. Find librarymcp__context7__resolve-library-idlibraryName: "EntityFrameworkCore"
2. Query docsmcp__context7__query-docsquery: "EF Core 8 to 9 migration breaking changes"

MCP Ref Usage

ActionToolQuery Example
Searchmcp__Ref__ref_search_documentation"dotnet EntityFrameworkCore 9 migration guide"
Readmcp__Ref__ref_read_urlURL 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

PriorityPackage Type
1SDK/Runtime (Microsoft.NET.Sdk)
2Framework (Microsoft.AspNetCore.*)
3EF Core (affects migrations)
4Logging (Serilog.*)
5Other packages

Commands

ActionCommand
Update specificdotnet add package <name> --version <ver>
Update alldotnet outdated --upgrade

Phase 6: Restore & Build

Commands

StepCommand
Restoredotnet restore
Builddotnet build --configuration Release
Testdotnet 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

FieldDescription
solutionSolution path
projects[]Updated projects
durationTotal time
upgrades[]Applied upgrades
buildVerificationPASSED or FAILED
testResultsX 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

ErrorCauseSolution
CS0246Missing typeSearch for replacement API
NU1605Downgrade detectedCheck package constraints
Build failBreaking changeApply 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 test all pass
  • Report returned with projects updated, upgrades applied, and build/test status

Version: 1.1.0 Last Updated: 2026-01-10

Source

git clone https://github.com/levnikolaevich/claude-code-skills/blob/master/ln-712-nuget-upgrader/SKILL.mdView on GitHub

Overview

ln-712-nuget-upgrader upgrades .NET NuGet packages with automatic breaking change detection and migration. It analyzes your solution or project, flags outdated and vulnerable packages, and applies upgrades with migration guidance while producing a comprehensive migration report.

How This Skill Works

The workflow runs in phases: pre-flight checks for csproj/sln, project discovery, security audit and outdated checks, detection of breaking changes by comparing current vs latest major versions and consulting breaking_changes_patterns.md, then applies upgrades, runs restore and build, and outputs a migration report.

When to Use It

  • You maintain a .NET solution with multiple NuGet dependencies and need to upgrade to newer major versions.
  • A security audit shows vulnerable or outdated packages that require upgrading.
  • You must migrate EF Core or other libraries with documented breaking changes.
  • You want automated migration guidance from official docs before upgrading.
  • You need to update packages and verify the solution builds with restore and tests.

Quick Start

  1. Step 1: Point the upgrader at your solution or project path and ensure a git backup.
  2. Step 2: Run the upgrader to discover projects, run security/audit checks, and detect outdated packages.
  3. Step 3: Review the migration report, apply upgrades, then run dotnet restore and build to validate.

Best Practices

  • Start with Phase 0 pre-flight checks: ensure at least one .csproj and run upgrades in a branch.
  • Keep git backups and coordinate with the repo owner as the skill notes.
  • Review the migration report and breaking-change notes before applying upgrades.
  • Prioritize upgrades in the order defined (SDK/Runtime, Framework, EF Core, logging, other).
  • Run dotnet restore and build to verify the upgrade after changes.

Example Use Cases

  • Upgrade EF Core from 8 to 9 and address new query and migration format changes using migration guides.
  • Migrate Serilog.AspNetCore from 7 to 8 and adjust configuration changes as documented.
  • Upgrade multiple NuGet packages identified by dotnet-outdated in a multi-project solution.
  • Upgrade Swashbuckle.AspNetCore with Minimal API support considerations.
  • Apply upgrades across shared/ and references/ folders in a multi-project repo, ensuring successful restore and build.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers