CPMigrate 2.7.3
See the version list below for details.
dotnet tool install --global CPMigrate --version 2.7.3
dotnet new tool-manifest
dotnet tool install --local CPMigrate --version 2.7.3
#tool dotnet:?package=CPMigrate&version=2.7.3
nuke :add-package CPMigrate --version 2.7.3
CPMigrate
The definitive CLI tool for modernizing .NET dependencies.
A stunning, intelligent CLI to migrate .NET solutions to Central Package Management (CPM) with zero friction.
๐ Why CPMigrate?
Managing NuGet versions across dozens of projects is a nightmare of "version drift."
Central Package Management (CPM) solves this by unifying versions in a single Directory.Packages.props file.
CPMigrate automates this transition. It doesn't just move XML around; it analyzes, resolves conflicts, cleans up dependencies, and secures your codebase in minutes.
โจ Features
๐ก๏ธ Intelligence & Security Suite (New in v2.5)
CPMigrate v2.5+ isn't just a migration tool; it's a repository health auditor.
- ๐ Transitive Pinning & Conflict Resolution
- Problem: Deep dependency chains often conflict, causing runtime errors.
- Solution: Automatically detects conflicts deep in the graph and "pins" the correct version at the root level.
- ๐งน Dependency Lifting (Redundant Reference Removal)
- Problem: Projects often explicitly reference packages that are already brought in by other libraries (e.g.,
Microsoft.Extensions.Logging). - Solution: Identifies and removes these redundant lines, keeping your
.csprojfiles lean.
- Problem: Projects often explicitly reference packages that are already brought in by other libraries (e.g.,
- ๐จ Integrated Security Audit
- Feature: Runs a real-time vulnerability scan (
dotnet list package --vulnerable) and integrates findings directly into the migration report. - Action: Highlights high-severity CVEs before you lock them into your CPM file.
- Feature: Runs a real-time vulnerability scan (
- ๐ฏ Framework Alignment Heatmap
- Feature: Visualizes target framework divergence (e.g., mixing
net8.0andnet472) which can complicate package resolution.
- Feature: Visualizes target framework divergence (e.g., mixing
๐๏ธ Clean Architecture (New in v2.6)
- Directory.Build.props Unification
- Problem: Repeating
<TargetFramework>,<Authors>, or<ImplicitUsings>in every single project file violates DRY. - Solution:
cpmigrate --unify-propsautomatically detects properties shared by all projects, moves them to a solution-levelDirectory.Build.props, and cleans up individual project files.
- Problem: Repeating
๐ฎ Mission Control Dashboard
- Zero-Typing Interface: Navigate your file system and options using only arrow keys.
- Risk Assessment: Pre-scans your repo to calculate a "Migration Risk" score based on version divergence.
- Live Verification: Automatically runs
dotnet restoreafter every major change to ensure build integrity. - Cyberpunk UI: A stunning, high-density terminal interface with progress blueprints and real-time status updates.
๐ฆ Installation
As a .NET Global Tool (Recommended)
Requires .NET SDK 8.0 or later (supports .NET 10).
dotnet tool install --global CPMigrate
Upgrading to the latest version:
dotnet tool update --global CPMigrate
Note: If you just released a version, NuGet indexing might take ~15 minutes. Try clearing your cache if updates aren't finding the new version:
dotnet nuget locals http-cache --clear
From Source
git clone https://github.com/georgepwall1991/CPMigrate.git
cd CPMigrate
dotnet build
๐น๏ธ Usage
Interactive Mode (The "Mission Control")
Simply run the command without arguments to enter the wizard:
cpmigrate
The tool will:
- Scan for solutions and git status.
- Dashboard your current repository state.
- Guide you through migration, cleanup, or analysis.
Command-Line (CI/CD & Power Users)
Migrate the current folder's solution:
cpmigrate -s .
Unify common properties to Directory.Build.props:
cpmigrate --unify-props
Dry-run (Preview changes):
cpmigrate --dry-run
Analyze and auto-fix issues (No migration, just cleanup):
cpmigrate --analyze --fix
Batch migrate an entire monorepo:
cpmigrate --batch /path/to/repo --batch-parallel
Options Reference
| Option | Short | Description |
|---|---|---|
--interactive |
-i |
Launch the Mission Control TUI (Default if no args). |
--solution |
-s |
Path to .sln file or directory. |
--unify-props |
- | Migrate common project properties to Directory.Build.props. |
--dry-run |
-d |
Simulate operations without writing files. |
--analyze |
-a |
Run health checks (duplicates, security, transitive). |
--fix |
- | Apply automatic fixes to discovered analysis issues. |
--rollback |
-r |
Restore the last backup state. |
--prune-backups |
- | Clean up old backup files to save space. |
--output |
- | Output format: Terminal (default) or Json (for CI pipes). |
๐ผ๏ธ Gallery
Mission Control Dashboard
The state-driven dashboard assessing migration risk.
Risk Analysis & Dry Run
Previewing massive changes safely before committing.
Security & Package Analysis
Scanning for vulnerabilities and redundant dependencies.
๐ค Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
๐ License
Distributed under the MIT License. See LICENSE for more information.
๐ค Author
George Wall
- GitHub: @georgepwall1991
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.3.0 | 106 | 2/2/2026 |
| 3.2.0 | 102 | 2/1/2026 |
| 3.1.0 | 100 | 2/1/2026 |
| 3.0.0 | 100 | 2/1/2026 |
| 2.10.3 | 101 | 2/1/2026 |
| 2.10.2 | 105 | 2/1/2026 |
| 2.9.1 | 101 | 1/27/2026 |
| 2.9.0 | 98 | 1/27/2026 |
| 2.8.1 | 103 | 2/1/2026 |
| 2.8.0 | 90 | 1/25/2026 |
| 2.7.5 | 192 | 12/20/2025 |
| 2.7.3 | 168 | 12/20/2025 |
| 2.7.0 | 163 | 12/19/2025 |
| 2.6.3 | 185 | 12/19/2025 |
| 2.6.2 | 175 | 12/19/2025 |
| 2.6.1 | 167 | 12/19/2025 |
| 2.6.0 | 177 | 12/19/2025 |
| 2.5.2 | 173 | 12/19/2025 |
| 2.5.1 | 174 | 12/19/2025 |
| 2.5.0 | 174 | 12/19/2025 |