CPMigrate 2.5.2

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global CPMigrate --version 2.5.2
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local CPMigrate --version 2.5.2
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=CPMigrate&version=2.5.2
                    
nuke :add-package CPMigrate --version 2.5.2
                    

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.

.NET License: MIT NuGet Downloads

CPMigrate Interactive Wizard

๐Ÿš€ 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 .csproj files lean.
  • ๐Ÿšจ 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.
  • ๐ŸŽฏ Framework Alignment Heatmap
    • Feature: Visualizes target framework divergence (e.g., mixing net8.0 and net472) which can complicate package resolution.

๐ŸŽฎ 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 restore after every major change to ensure build integrity.
  • Cyberpunk UI: A stunning, high-density terminal interface with progress blueprints and real-time status updates.

๐Ÿ“ฆ Installation

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:

  1. Scan for solutions and git status.
  2. Dashboard your current repository state.
  3. Guide you through migration, cleanup, or analysis.

Command-Line (CI/CD & Power Users)

Migrate the current folder's solution:

cpmigrate -s .

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.
--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).

Mission Control Dashboard

CPMigrate Interactive The state-driven dashboard assessing migration risk.

Risk Analysis & Dry Run

CPMigrate Demo Previewing massive changes safely before committing.

Security & Package Analysis

CPMigrate Analyze 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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more information.

๐Ÿ‘ค Author

George Wall

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed