Skip to main content

Check and update NuGet package versions in Directory.Packages.props (Central Package Management)

Total Downloads
547
547
Published
Jun 19, 2026
4mo ago

Get Started

dotnet add package georg-jung.update-cpm-versions --version 0.1.34

No framework information available.

README

update-cpm-versions logo update-cpm-versions

Build Status NuGet version (update-cpm-versions) codecov

A .NET tool that checks for outdated NuGet packages in Directory.Packages.props and updates them. Like dotnet-outdated, but designed for Central Package Management -- it just works directly on the props file instead of applying dependency resolution approaches.

Installation

dotnet tool install -g georg-jung.update-cpm-versions

Usage

# Update packages in the current directory (finds Directory.Packages.props automatically)
update-cpm-versions

# Preview changes without modifying the file
update-cpm-versions --dry-run

# Specify a path
update-cpm-versions ./path/to/directory
update-cpm-versions ./path/to/Directory.Packages.props

# Allow major version updates
update-cpm-versions --major

# Only update patch versions
update-cpm-versions --patch-only

Filtering

Use --include or --exclude (mutually exclusive) with glob patterns to control which packages are in scope:

# Only update Microsoft packages
update-cpm-versions --include "Microsoft.*"

# Update everything except Contoso packages
update-cpm-versions --exclude "Contoso.*"

# Multiple patterns
update-cpm-versions --exclude "Contoso.*" --exclude "Legacy.*"

Use --pin-major with --major to allow major updates globally but keep specific packages on their current major version:

# Update all packages including major, but keep EF Core on its current major
update-cpm-versions --major --pin-major "Microsoft.EntityFrameworkCore.*"

Options

Option Description
[path] Path to Directory.Packages.props or its parent directory. Default: current directory (searches parent directories).
--major Allow major version updates. Default: only minor/patch updates.
--patch-only Only update patch versions.
--include <glob> Only update packages matching this glob pattern. Repeatable.
--exclude <glob> Skip packages matching this glob pattern. Repeatable.
--pin-major <glob> With --major, keep matching packages on their current major version. Repeatable.
--dry-run, -n Preview what would be updated without modifying the file.
--source <url> NuGet V3 feed URL. Default: nuget.org.

How It Works

  1. Finds and parses Directory.Packages.props (supports <PackageVersion> and <GlobalPackageReference> items)
  2. Queries the NuGet V3 flat container API for each package's available versions (parallelized, up to 16 concurrent requests)
  3. Applies SemVer 2 version band logic to determine the best update for each package
  4. Writes updated versions back to the file, preserving XML structure

License

MIT

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.