lr-nuget-update 2025.12.30.413
lr-nuget-update
A command-line tool to keep your NuGet packages up to date when using Central Package Management (Directory.Packages.props). It scans your solution, checks for newer versions, and updates your centralized configuration automatically.
Usage
Run it directly with dnx:
dnx -y lr-nuget-update [directory]
Examples
Update packages in the current directory:
dnx -y lr-nuget-update
Update packages in a specific project or solution folder:
dnx -y lr-nuget-update ./src/MyProject
How it works
The tool follows a smart process to ensure your solution is updated safely and correctly:
- Solution Discovery
It finds your
.slnfile. If not found in the current directory, it searches up the folder tree (up to 10 levels) until it locates one. - Project & Package Scanning
It identifies all
.csprojfiles within the solution and extracts all used NuGet packages. - Version Checking
It queries your configured NuGet sources (including private ones from your
nuget.config) for the latest available versions. - Safe Updates By default, it only updates to the latest version within the same Major version. This prevents breaking changes while ensuring you get the latest bug fixes and minor improvements.
- Centralized Management
- It writes updates directly to
Directory.Packages.props. - If the file doesn't exist, it creates one and enables Central Package Management for you.
- It ensures
Directory.Packages.propsis added to your "Solution Items" folder so it's easily accessible in your IDE.
- It writes updates directly to
Good to know
- CPM Support: This tool is specifically designed for projects using Central Package Management.
- Transitive Pinning: When creating a new
Directory.Packages.props, it enablesCentralPackageTransitivePinningEnabledby default. - Safety: As with any tool that modifies project files, it's recommended to run this on a clean git state so you can easily undo the changes if needed.
- Requirements: Requires .NET 10.0 or later.
Installation
If you prefer to have it installed globally on your machine:
dotnet tool install -g lr-nuget-update
Usage after installation:
lr-nuget-update [directory]
This package has no dependencies.
| Version | Downloads | Last updated |
|---|---|---|
| 2026.1.29.2106 | 3 | 01/29/2026 |
| 2026.1.6.2043 | 5 | 01/06/2026 |
| 2025.12.30.415 | 3 | 12/30/2025 |
| 2025.12.30.413 | 2 | 12/30/2025 |
| 2025.12.30.352 | 3 | 12/30/2025 |
| 2025.12.30.346 | 3 | 12/30/2025 |
| 2025.12.30.343 | 2 | 12/30/2025 |
| 2025.12.30.337 | 2 | 12/30/2025 |