Agent skill
dotnet-update-packages
Lists and updates outdated NuGet packages in .NET projects. Also use when the user mentions "update packages," "outdated NuGet," "upgrade dependencies," "dotnet package update," "check for updates," or "package versions." For centralizing package versions, see dotnet-centralise-packages.
Install this agent skill to your Project
npx add-skill https://github.com/Im5tu/claude/tree/main/skills/dotnet-update-packages
Metadata
Additional technical details for this skill
- author
- Im5tu
- version
- 1.0
- repositoryUrl
- https://github.com/im5tu/dotnet-skills
SKILL.md
.NET Package Updates
Note: This skill requires .NET 10 SDK or later. The
dotnet package updatecommand does not exist in .NET 8-9.
When to Use
This skill applies when the user:
- Asks about outdated NuGet packages
- Wants to update dependencies in a .NET project
- Mentions package version upgrades
- Discusses dependency management in .NET
Workflow
-
List outdated packages (including transitive) using:
bashdotnet package list --outdated --include-transitive --format json -
Check for empty results - If no outdated packages found, inform the user and stop
-
Parse output to identify:
- Projects with outdated packages
- Whether each package is direct or transitive
-
Analyze project dependencies by reading
<ProjectReference>elements in each csproj -
Present findings in a readable format showing project, package name, current → latest version
-
Confirm with user before making changes - ask which option:
- All packages
- Specific packages by name
- Cancel
-
Update packages per project with
--projectparameter:- Update leaf projects first (no dependencies)
- Then update dependent projects
- Independent branches can run in parallel
bashdotnet package update <package> --project <path-to-csproj> -
Verify with
dotnet build -
If build fails, ask user:
- Fix automatically (review errors, apply fixes)
- Fix manually (show errors, let user handle)
-
Report results - summarize what was updated and the final build status
Key Commands
| Command | Purpose |
|---|---|
dotnet package list --outdated --include-transitive --format json |
List outdated packages (incl. transitive) |
dotnet package update <name> --project <path> |
Update specific package in project |
dotnet package update --project <path> |
Update all packages in project |
Transitive vs Direct Packages
- Direct: Explicitly in csproj. Update directly.
- Transitive: Pulled in by dependencies. Marked
[T]in output.- To update: update the parent package, or add direct reference to pin version
Error Handling
- If
dotnet package listfails: Check if we're in a .NET project directory - If
dotnet package updatefails for a specific package: Report it and continue with others - If build fails after updates:
- Parse the build errors
- Ask user: fix automatically or manually?
- If automatic: analyze errors and apply fixes
- Re-run build to verify
Notes
- Requires .NET 8+ SDK for
dotnet package update - Always use
--projectparameter to update per-project - Update in dependency order: leaves first, then dependents
- Always confirm with user before updating
- Run build after updates to catch breaking changes
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
flutter-animations
Comprehensive guide for implementing animations in Flutter. Use when adding motion and visual effects to Flutter apps: implicit animations (AnimatedContainer, AnimatedOpacity, TweenAnimationBuilder), explicit animations (AnimationController, Tween, AnimatedWidget/AnimatedBuilder), hero animations (shared element transitions), staggered animations (sequential/overlapping), and physics-based animations. Includes workflow for choosing the right animation type, implementation patterns, and best practices for performance and user experience.
dotnet-source-gen-logging
Converts logging to use the LoggerMessage source generator for high-performance, AOT-compatible logging. Also use when the user mentions "LoggerMessage," "logging source generator," "high-performance logging," "optimize logging," "AOT logging," or "structured logging source gen." For full AOT analysis, see dotnet-aot-analysis.
dotnet-source-gen-options-validation
Converts options validation to use the compile-time source generator for AOT-compatible, reflection-free validation. Also use when the user mentions "OptionsValidator," "options validation source gen," "AOT options validation," "compile-time validation," "ValidateDataAnnotations replacement," or "reflection-free validation." For full AOT analysis, see dotnet-aot-analysis.
dotnet-enable-testing-platform
Enables the Microsoft Testing Platform runner in global.json. Also use when the user mentions "testing platform," "Microsoft.Testing.Platform," "new test runner," "migrate test runner," "global.json testing," or "modern test platform."
dotnet-json-polymorphic
Configures polymorphic JSON serialization with [JsonPolymorphic] and [JsonDerivedType] attributes. Also use when the user mentions "polymorphic JSON," "JsonDerivedType," "JSON inheritance," "type discriminator," "serialize derived types," or "JSON polymorphism." For full JSON source generation, see dotnet-source-gen-json.
competitor-alternatives
When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' or 'competitive landing pages.' Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. Emphasizes deep research, modular content architecture, and varied section types beyond feature tables.
Didn't find tool you were looking for?