Easy2Work.LegacyModernizer 0.1.0

dotnet tool install --global Easy2Work.LegacyModernizer --version 0.1.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 Easy2Work.LegacyModernizer --version 0.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Easy2Work.LegacyModernizer&version=0.1.0
                    
nuke :add-package Easy2Work.LegacyModernizer --version 0.1.0
                    

Easy2Work Legacy Modernizer

Enterprise Legacy Code Analysis Platform

Prove business value before rewriting a single line of code.

Legacy Modernizer is a .NET tool that analyzes 10-15 year old WinForms and VB.NET applications to extract business logic, build dependency graphs, and provide board-level visibility into your legacy codebaseβ€”without changing any behavior.


🎯 Problem Statement

Your company has a critical 50,000+ line WinForms/VB.NET application. It works, but:

  • No one fully understands the business logic anymore
  • Documentation is outdated or missing
  • Moving to modern platforms feels risky
  • You need proof before investing in modernization

Legacy Modernizer gives CTOs and technical leaders the visibility they need to make informed decisions.


πŸš€ Quick Start

Installation

dotnet tool install --global Easy2Work.LegacyModernizer

Usage

legacy-modernizer analyze YourSolution.sln --output report.json

That's it. The tool will:

  1. Scan your entire solution
  2. Identify forms, methods, and dependencies
  3. Extract business rules from comments
  4. Generate a structured JSON report

πŸ“Š What You Get

When you run the analyzer on your legacy ERP system, you see:

═══════════════════════════════════════════════════════════
                    ANALYSIS SUMMARY                       
═══════════════════════════════════════════════════════════

πŸ“Š Projects Analyzed:        8
πŸ“„ Total Files:              342
πŸ“ Lines of Code:            52,847

πŸ–ΌοΈ  Forms:                    87
⚑ Event Handlers:           423
πŸ”§ Business Methods:         1,284
πŸ“‹ Business Rules:           156

⏱️  Duration:                 12.3s

This is board-level visibility.

The generated report.json contains:

  • Complete dependency graph of all methods
  • Forms and their event handlers
  • Business method relationships
  • External dependencies (database, services)
  • Annotated business rules

πŸ’‘ Core Features (v0.1 MVP)

1️⃣ Project Analysis

  • Scans WinForms and VB.NET solutions
  • Uses Roslyn for semantic analysis
  • Handles 50k+ LOC codebases
  • No crashes on messy legacy code

2️⃣ Dependency Graph

Outputs:

{
  "form": "InvoiceForm",
  "events": ["btnSave_Click", "btnCalculate_Click"],
  "businessMethods": [
    "CalculateTax",
    "ValidateInvoice",
    "SaveInvoice"
  ],
  "externalDependencies": [
    "CustomerRepository",
    "SqlConnection"
  ]
}

3️⃣ Business Rule Extraction

Document tribal knowledge directly in code:

C#:

// @BusinessRule: InvoiceTaxCalculation - Applies state tax based on customer location
public decimal CalculateTax(Invoice invoice)
{
    // ... implementation
}

VB.NET:

' @BusinessRule: InvoiceTaxCalculation - Applies state tax based on customer location
Public Function CalculateTax(invoice As Invoice) As Decimal
    ' ... implementation
End Function

The tool extracts these annotations and includes them in the report.

4️⃣ CLI-First Design

No dashboards. No web UI. Just reliable analysis you can run in CI/CD pipelines.


πŸ— Architecture

Easy2Work.LegacyModernizer
 β”œβ”€β”€ Core/
 β”‚   β”œβ”€β”€ ProjectAnalyzer      - Roslyn-based solution analyzer
 β”‚   β”œβ”€β”€ FormDetector         - WinForms detection
 β”‚   β”œβ”€β”€ MethodGraphBuilder   - Dependency graph construction
 β”‚   └── RuleExtractor        - Business rule extraction
 β”œβ”€β”€ Models/
 β”‚   β”œβ”€β”€ AnalysisReport       - Report structure
 β”‚   └── DependencyNode       - Graph node model
 β”œβ”€β”€ CLI/                     - Command-line interface
 └── Tests/                   - Unit tests

Technology Stack:

  • .NET 8
  • Roslyn (Microsoft.CodeAnalysis)
  • System.CommandLine
  • C# 12

πŸ“ˆ Success Criteria

βœ… Analyze 50k+ LOC applications
βœ… Extract 80%+ of business methods correctly
βœ… Handle messy legacy code without crashing
βœ… Generate structured, actionable reports
βœ… Published on NuGet as a .NET tool


πŸ”₯ Why This Matters

When a CTO runs:

legacy-modernizer analyze Enterprise-ERP.sln

And sees:

  • 342 Forms
  • 2,184 Business Methods
  • 186 Data Access Calls
  • 91 Documented Business Rules

That is actionable intelligence.

This tool doesn't rewrite code. It doesn't use AI to guess intent. It provides trust and visibility so you can make data-driven modernization decisions.


πŸ›  Building from Source

git clone https://github.com/yourorg/legacy-modernizer.git
cd legacy-modernizer
dotnet build
dotnet test

Pack as NuGet Tool

dotnet pack Easy2Work.LegacyModernizer.CLI/Easy2Work.LegacyModernizer.CLI.csproj -c Release

Install Locally

dotnet tool install --global --add-source ./Easy2Work.LegacyModernizer.CLI/nupkg Easy2Work.LegacyModernizer

πŸ“– Usage Examples

Basic Analysis

legacy-modernizer analyze MySolution.sln

Custom Output Path

legacy-modernizer analyze MySolution.sln --output analysis-results.json

Verbose Mode

legacy-modernizer analyze MySolution.sln --verbose

Compact JSON (no formatting)

legacy-modernizer analyze MySolution.sln --output report.json --pretty false

🎯 Roadmap

v0.1 (Current - MVP)

  • βœ… WinForms/VB.NET analysis
  • βœ… Dependency graph generation
  • βœ… Business rule extraction
  • βœ… CLI tool

v0.2 (Future)

  • Data flow analysis
  • SQL query extraction
  • Cross-assembly analysis
  • HTML report generation

v0.3 (Future)

  • Web API endpoint suggestions
  • Blazor migration hints
  • Architecture recommendations

🧠 Philosophy

This project is built with enterprise platform thinking:

  1. Prove value first - No rewrites until you understand what you have
  2. Zero behavior change - The tool only reads, never modifies
  3. Trust over AI - Semantic analysis, not guesswork
  4. Boring technology - Roslyn, .NET, JSON. Reliable and well-understood.

πŸ“„ License

MIT License - See LICENSE file for details


🀝 Contributing

This is a focused MVP. Contributions welcome for:

  • Bug fixes
  • Performance improvements
  • Additional language support (C++/CLI, etc.)
  • Enhanced detection heuristics

πŸ“ž Support

For enterprise support, custom analysis, or consulting:


Built for CTOs, architects, and teams who need to modernize 10-15 year old applications with confidence.

No AI rewriting. No magic. Just visibility.

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 was computed.  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 was computed.  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
0.1.0 135 2/11/2026