Type: L3 Worker Category: 7XX Project Bootstrap Parent: ln-710-dependency-upgrader
Upgrades .NET NuGet packages with automatic breaking change detection and migration.
Overview
| Input | Solution/project path
| Output | Updated .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
| .csproj file(s) | Yes | Block upgrade
| .sln file | No | Use csproj discovery instead
Workers assume coordinator (ln-710) already verified git state and created backup.
Phase 1: Find Projects
Discovery Methods
| Find .csproj
| Get-ChildItem -Recurse -Filter *.csproj
| From solution
| dotnet sln list
Phase 2: Security Audit
Commands
| Vulnerable packages
| dotnet list package --vulnerable
| Outdated packages
| dotnet list package --outdated
Actions
| Critical | Block upgrade, report
| High | Warn, continue
| Moderate/Low | Log only
Phase 3: Check Outdated
Using dotnet-outdated
| 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
-
Use MCP tools (see below) for migration guides
Common Breaking 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)
| 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
| 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
| 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
| 1 | SDK/Runtime (Microsoft.NET.Sdk)
| 2 | Framework (Microsoft.AspNetCore.*)
| 3 | EF Core (affects migrations)
| 4 | Logging (Serilog.*)
| 5 | Other packages
Commands
| Update specific
| dotnet add package <name> --version <ver>
| Update all
| dotnet outdated --upgrade
Phase 6: Restore & Build
Commands
| 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
| 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
| CS0246 | Missing type | Search for replacement API
| NU1605 | Downgrade detected | Check package constraints
| Build fail | Breaking change | Apply migration via Context7
References
Version: 1.1.0 Last Updated: 2026-01-10