CPMigrate 2.5.0

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global CPMigrate --version 2.5.0
                    
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.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=CPMigrate&version=2.5.0
                    
nuke :add-package CPMigrate --version 2.5.0
                    

CPMigrate

A stunning CLI tool to migrate .NET solutions to Central Package Management (CPM).

.NET License: MIT NuGet

CPMigrate Interactive Wizard

Features

  • Mission Control Dashboard - Intelligent repository pre-scan with risk assessment and situational awareness.
  • Zero-Typing Interaction - Entirely selection-driven UI with a visual path browser for navigating your file system.
  • Smart Conflict Resolution - Impact-aware version selection showing exactly how many projects use each version.
  • Live Verification Loop - Automatic dotnet restore verification with autonomous recovery and rollback options.
  • Batch Migration - Effortlessly migrate multiple solutions across a monorepo in one go.
  • Package Analysis & Auto-Fix - Scan for issues like version divergence or redundant references and fix them instantly.
  • Cyberpunk Terminal UI - Stunning neon-styled interface with progress tracking and mission status blueprints.
  • Safe by Default - Automatic backups, Git health checks, and a comprehensive rollback system.

New in v2.5: "Intelligence & Security"

  • Transitive Pinning: Detect and resolve version conflicts deep in your dependency tree.
  • Dependency Lifting: Automatically identify and remove direct references that are already provided transitively.
  • Security Audit Mission: Integrated vulnerability scanning (dotnet list package --vulnerable).
  • Framework Alignment: Heatmap visualization of Target Frameworks and divergence detection.
  • Automated Fixers: One-click resolution for transitive conflicts and redundant references.
  • Mission Control Dashboard: Intelligent repository pre-scan with risk assessment and situational awareness.
  • Visual Path Browser: Navigate and select solutions or projects using arrow keys.

Installation

As a .NET Global Tool

dotnet tool install --global CPMigrate

From Source

git clone https://github.com/georgepwall1991/CPMigrate.git
cd CPMigrate
dotnet build

Usage

Simply run cpmigrate with no arguments to enter Mission Control:

cpmigrate

The tool will immediately:

  1. Scan your current directory for solutions and existing CPM setups.
  2. Dashboard your repository state (Git health, backups, solutions).
  3. Assess Risk based on version divergence across projects.
  4. Offer Quick Actions like "Fast-Track Migration" or "Optimize Existing Setup".
  5. Guide you through a selection-based path browser if manual setup is needed.

Command-Line Usage

# Migrate current directory (looks for .sln file)
cpmigrate -s .

# Preview changes without modifying files
cpmigrate --dry-run

# Migrate all solutions in a directory recursively
cpmigrate --batch /path/to/repo

# Analyze packages for issues
cpmigrate --analyze --fix

Options

Core Options
Option Short Description Default
--interactive -i Run in interactive Mission Control mode false
--solution -s Path to solution file or directory .
--project -p Path to project file or directory -
--dry-run -d Preview changes without modifying files false
--merge - Merge into existing Directory.Packages.props if present false
--rollback -r Restore project files from backup false
--analyze -a Analyze packages for issues false
--fix - Automatically apply fixes for detected issues false
--no-backup -n Disable automatic backup false
--conflict-strategy - Resolution: Highest, Lowest, Fail Highest
--interactive-conflicts - Manually choose version for every conflict false
Output & CI/CD
Option Description Default
--output Output format: Terminal or Json Terminal
--output-file Write JSON output to file instead of stdout -
--quiet Suppress progress bars and spinners false
Batch Processing & Backups
Option Description Default
--batch Scan directory for .sln files and process each -
--batch-parallel Process solutions in parallel false
--prune-backups Delete old backups, keeping most recent false
--retention Number of backups to keep when pruning 5

Interactive Mission Control

When you start CPMigrate, you're presented with a high-density dashboard:

 ┌───────────────── REPOSITORY CONTEXT ─────────────────┐
 │ Directory  /Users/dev/MyProject                      │
 │ Solutions  3 solution(s) detected                    │
 │ Using CPM  NO                                        │
 │ Git Status Clean                                     │
 │ Backups    2 backup set(s) available                 │
 └──────────────────────────────────────────────────────┘
 ┌───────────────────── ASSESSMENT ─────────────────────┐
 │ Migration Risk: MEDIUM                               │
 │ Impact Area:    12 projects                          │
 │ Assessment:     Minor version divergence detected.    │
 └──────────────────────────────────────────────────────┘

 What's the mission?
 🚀 Fast-Track Migration (Auto-resolve 5 conflicts)
 🛠  Migrate & Review Conflicts Individually
 📦 Batch migrate multiple solutions
 Exit

What is Central Package Management?

Central Package Management (CPM) allows you to manage all package versions in a single Directory.Packages.props file. This eliminates "version drift" where different projects use different versions of the same library.

Before (Traditional)

 <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
 <PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> 

After (CPM)


<ItemGroup>
  <PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>


<PackageReference Include="Newtonsoft.Json" /> 

Terminal UI Features

The stunning cyberpunk-inspired terminal UI includes:

  • Mission Status Tracker: Real-time blueprint showing progress through DISCOVERY -> ANALYSIS -> BACKUP -> MIGRATION -> VERIFICATION.
  • Risk Gauge: Visual color-coded assessment of migration complexity.
  • Impact-Aware Choice: Selection menus that show project usage counts for package versions.
  • Animated Dashboards: Framed panels and grids for professional information density.

Screenshots

Mission Control (Interactive Mode)

CPMigrate Interactive

The new state-driven Mission Control dashboard with risk assessment.

Migration Mode (CLI)

CPMigrate Demo

Dry-run mode previewing changes with the cyberpunk-styled terminal UI.

Package Analysis

CPMigrate Analyze

Analyze mode scanning for package issues without modifying files.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Regenerating Documentation Media

To regenerate the GIFs and recordings for the README:

# Prerequisites
brew install asciinema agg expect

# Generate all documentation media
./scripts/generate-docs-media.sh

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

George Wall

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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 108 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 91 1/25/2026
2.7.5 192 12/20/2025
2.7.3 168 12/20/2025
2.7.0 164 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 178 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