CPMigrate
Directory.Packages.props migration

How to migrate to Directory.Packages.props without doing it by hand

If your .NET solution still carries package versions across many project files, CPMigrate gives you a repeatable path into NuGet Central Package Management instead of a one-off XML cleanup.

dotnet tool install --global CPMigrate
cpmigrate -s ./MySolution.sln --dry-run
cpmigrate -s ./MySolution.sln

What CPMigrate does during migration

  • Scans projects from a .sln or .slnx entry point.
  • Collects existing package references and resolves version conflicts.
  • Generates a centralized Directory.Packages.props.
  • Removes redundant inline version attributes from project files.
  • Creates backups before writing changes.

Why app teams use it

  • Migration becomes reviewable and repeatable.
  • Dry-run mode makes before/after inspection easy.
  • Conflict strategy is explicit instead of hidden in manual edits.
  • Rollback stays available if the team needs to reverse course.
Proof asset: use the bundled small solution example to compare project files before and after migration.