Nuget Tools - Projects Nuget Updater

NuGet Tools are command-line utilities that can be installed globally or locally for .NET development environments and extend your development experience with specialized functionality.​

​They are written with standard .NET Technology and can be global tools accessible system-wide or local tools scoped to specific projects or solutions.

Projects Nuget Updater

This package provides a comprehensive .NET global tool specifically designed to automate NuGet package updates across entire solutions with built-in git workflow support, build and test validation, and secure Personal Access Token (PAT) configuration for private NuGet feeds.

​One of the most tedious and risky aspects of maintaining .NET solutions is keeping NuGet packages up to date across multiple projects. Every time you need to update dependencies, you traditionally need to manually check each project for outdated packages, update them one by one, verify nothing breaks, and manage version consistency across the entire solution. This manual process is time-consuming, easy to forget, and frequently leads to inconsistencies where different projects reference different versions of the same package, or worse—updates introduce breaking changes that aren't discovered until runtime.

​Instead of manually updating packages project by project or risking blind updates without validation, this tool handles the entire process automatically with comprehensive safety checks. Whenever you run the tool against your solution directory, it automatically scans all projects recursively, identifies outdated NuGet packages, updates them to their latest versions, creates a dedicated git branch for the changes, runs pre-update builds and tests to ensure the solution is stable, applies all package updates across the solution, runs post-update builds and tests to validate nothing broke, commits the changes with descriptive messages, and pushes the branch to your remote repository for review.

​This automation ensures your solutions stay current with the latest bug fixes, security patches, and performance improvements without any manual intervention, while eliminating the risk of breaking changes being committed to your main branch. The tool handles complex scenarios like private NuGet feeds requiring authentication, project filtering using wildcards or explicit lists, custom build configurations, and flexible git workflows that can be adjusted to match your team's processes. Whether maintaining large enterprise solutions with dozens of projects, working with continuous integration pipelines, managing solutions that consume packages from private Azure DevOps feeds, or ensuring consistent package versions across microservice architectures, developers can leverage this tool to eliminate manual package maintenance overhead.

​The integration is straightforward—install the tool globally once using dotnet tool install --global Samayas.Tools.ProjectsNugetUpdater, navigate to your solution directory, and run projects-nuget-updater to execute the entire update workflow. For private feeds, run the interactive projects-nuget-updater setup-pat command once to securely configure your Personal Access Token, which is stored encrypted using Windows Data Protection API (DPAPI) on Windows and platform-specific encrypted storage on Linux and macOS. The tool provides extensive customization through command-line options, allowing you to disable git operations with --usegit=false, skip validation steps with --prebuild=false or --posttest=false, filter specific projects with --filteronprojectfiles="MyApp.*.csproj", exclude certain projects with --excludeprojectfiles="*.Tests.csproj", customize the git branch name with --gitbranchname=feature/update-deps, and choose between Debug and Release build configurations with --buildconfiguration=Debug.

​Key Features:

  • Automated solution-wide package scanning and updating to latest versions
  • Built-in git workflow with branch creation, commits, and push operations
  • Pre and post-update build validation to prevent breaking changes
  • Pre and post-update test execution to ensure functional stability
  • Secure PAT configuration for Azure DevOps and private NuGet feeds​
  • Flexible project filtering using wildcard patterns or explicit lists​
  • Project exclusion capability to skip test or benchmark projects​
  • Customizable git branch names and commit messages​
  • Support for custom NuGet configuration files​​
  • Optional workflow steps for maximum flexibility​​​
  • Comprehensive error handling and validation​
  • Cross-platform support for Windows, Linux, and macOS​


Note: This tool requires .NET 9.0 Runtime or later and is designed for solutions contained within git repositories when git operations are enabled.​

You can find a video of how to use this Nuget Package here.