SolutionScanner: A Comprehensive C# Solution Analysis Tool
Project Overview
I've recently developed SolutionScanner, a Windows Forms application designed to streamline the process of analyzing and documenting C# solution structures. This tool addresses a common challenge in software development: quickly understanding complex codebases without extensive manual investigation.
Core Functionality
SolutionScanner performs intelligent analysis of C# solutions by:
- Recursively scanning directories for
.cs, .csproj, and .sln files
- Extracting metadata including classes, methods, properties, enums, and interfaces
- Organizing results in hierarchical tree views
- Supporting multiple export formats (Text, JSON, Clipboard)
- Providing syntax highlighting for enhanced readability
Technical Architecture
The application is built with:
- .NET 4.7.2 with Windows Forms
- MaterialSkin for modern UI components
- Newtonsoft.Json for JSON serialization
- Regex-based parsing for C# code analysis
- Async file operations for responsive performance
Key Features
Solution Analysis
- Automatic detection of solution and project files
- Hierarchical organization of code structure
- Real-time progress reporting during scans
Code Extraction
- Comprehensive parsing of C# language constructs
- Detailed member information including access modifiers and parameters
- Support for nested classes and complex type hierarchies
Export Capabilities
- Text (Tree): Formatted hierarchical representation
- Text (Flat): Simplified one-line-per-item format
- JSON: Structured data suitable for APIs and automation
- Clipboard: Quick copy functionality for sharing results
User Experience
- Clean, responsive Material Design interface
- Syntax highlighting for C# and JSON content
- Interactive tree navigation with file preview
- Non-blocking UI during processing operations
Use Cases
Development Workflows
- Legacy Code Analysis: Quickly understand unfamiliar codebases
- Documentation Generation: Create solution structure documentation
- Code Review Preparation: Assess project organization before reviews
- Migration Planning: Analyze dependencies and structure for refactoring
Team Collaboration
- Onboarding: Accelerate new team member ramp-up
- Knowledge Sharing: Create reference materials for team use
- Standards Compliance: Verify consistent naming and access patterns
Project Management
- Progress Tracking: Monitor codebase growth and complexity
- Technical Reporting: Generate structured data for stakeholder review
Implementation Details
The tool utilizes a robust data model that includes:
public class SolutionData
{
public string Name { get; set; }
public string Path { get; set; }
public List<ProjectData> Projects { get; set; }
// Additional metadata and standalone file support
}
Parsing is performed using optimized regular expressions that handle:
- Access modifiers and class declarations
- Property and method signatures
- Parameter lists and return types
- Enum, struct, and interface definitions
Performance Considerations
- Efficient file I/O with streaming file reading
- Asynchronous processing to maintain UI responsiveness
- Memory-conscious data structures for large solutions
- Incremental UI updates during scanning operations
Getting Started
Prerequisites
- .NET 4.7.2 Runtime (for executable)
- Windows 7Sp1/8/10/11 (Windows Forms platform)
Quick Start
- Download the latest release from GitHub
- Run the executable
- Browse to your solution folder
- Click "Scan" to begin analysis
- Export results in your preferred format
Building from Source
git clone https://github.com/tsgiannis/SolutionScanner.git
cd SolutionScanner
# Open in Visual Studio and build
Project Structure
SolutionScanner/
├── Form1.cs # Main application logic
├── AboutForm.cs # Project information dialog
├── Program.cs # Application entry point
├── README.md # Comprehensive documentation
└── CSharpFileScanner.csproj # Project configuration
Contribution Opportunities
The project welcomes contributions in several areas:
- Enhanced C# parsing (generics, async/await, attributes)
- Additional export formats (XML, CSV, Markdown)
- Performance optimizations for large solutions
- Plugin architecture for custom analyzers
License
This project is released under the MIT License, permitting free use, modification, and distribution with attribution.
About the Author
John Tsioumpris - Full-stack developer specializing in .NET, Python, SQL, and enterprise application development. The tool was developed to address real-world challenges in codebase analysis and documentation.
Contact: Emails are not allowed
Portfolio: Solutions4It.guru
Repository: https://github.com/tsgiannis/SolutionScanner
Conclusion
SolutionScanner provides developers with a practical tool for understanding and documenting C# solutions efficiently. By automating the extraction and organization of codebase information, it reduces the time and effort required for solution analysis while providing valuable insights into project structure and organization.
The tool's export capabilities make it suitable for integration into various development workflows, from individual analysis to team documentation processes.
GitHub Repository: https://github.com/tsgiannis/SolutionScanner
Feedback and Contributions: Welcome through GitHub issues and pull requests