A powerful command-line tool for analyzing NuGet packages and .NET assemblies using reflection. Quickly explore package contents, types, methods, and properties without writing code or digging through documentation.
- NuGet Package Analysis: Download and analyze any NuGet package directly by name
- Local DLL Analysis: Inspect .dll files from your filesystem
- Comprehensive Type Information: View all public types including classes, interfaces, enums, and structs
- Member Details: See constructors, properties, methods, and events with clear formatting
- Smart Dependency Resolution: Automatically resolves assembly dependencies
- Beautiful Console Output: Color-coded output with intuitive icons for easy reading
- Safe Inspection: Uses reflection without executing any code from analyzed packages
- .NET SDK 6.0 or later
- Internet connection (for NuGet package analysis)
git clone https://github.com/sojohnnysaid/PackageAnalyzer.git
cd PackageAnalyzer
dotnet builddotnet tool install -g PackageAnalyzerdotnet run Newtonsoft.Json
dotnet run Serilog
dotnet run Microsoft.EntityFrameworkCoredotnet run /path/to/your/assembly.dlldotnet run helpFor packages with extensive APIs, pipe the output to less for easier navigation:
dotnet run Microsoft.EntityFrameworkCore | lessThe analyzer uses icons and colors to make the output easy to understand:
- 📘 Regular Class
- 🔒 Static Class
- 🎨 Abstract Class
- 🔌 Interface
- 📝 Enum
- 📦 Struct
- Yellow: Constructors
- Green: Properties
- Cyan: Methods
- Magenta: Events
╔═══════════════════════════════════════════════════════════════╗
║ 📦 PACKAGE: Newtonsoft.Json v13.0.3 ║
╚═══════════════════════════════════════════════════════════════╝
🗂️ Namespace: Newtonsoft.Json
────────────────────────────────────────────────────
📘 JsonConvert (static class)
Methods:
• static string SerializeObject(object value)
• static T DeserializeObject<T>(string value)
• static void PopulateObject(string value, object target)
🔌 IJsonLineInfo (interface)
Properties:
• int LineNumber { get; }
• int LinePosition { get; }
Methods:
• bool HasLineInfo()
- Creates a temporary .NET project
- Uses
dotnet add packageto download from NuGet - Locates the package in the NuGet cache
- Finds the best matching framework version
- Loads assemblies using .NET Reflection
- Analyzes all public types and members
- Cleans up temporary files automatically
- Loads the assembly directly from the specified path
- Automatically resolves dependencies from:
- Same directory as the DLL
- NuGet cache for known packages
- Analyzes all public types and members
The analyzer automatically selects the best framework version from the package, with preference for:
- .NET 8.0
- .NET 7.0
- .NET 6.0
- .NET 5.0
- .NET Standard 2.1
- .NET Standard 2.0
- .NET Core 3.1
- API Exploration: Quickly understand what a NuGet package offers
- Dependency Analysis: See what types and methods are available in a library
- Documentation Alternative: Get a quick overview when documentation is lacking
- Learning Tool: Explore how popular packages are structured
- Migration Planning: Understand APIs before upgrading package versions
- Security Review: Inspect package contents without executing code
Contributions are welcome! Please feel free to submit a Pull Request.
git clone https://github.com/sojohnnysaid/PackageAnalyzer.git
cd PackageAnalyzer
dotnet restore
dotnet builddotnet testMIT License - see LICENSE file for details
Created as a utility tool to help developers quickly explore .NET packages and assemblies.
- Built with .NET reflection capabilities
- Inspired by the need for quick package exploration tools
- Thanks to the .NET community for feedback and suggestions
- Export analysis results to JSON/XML
- Filter by access modifiers (public, protected, etc.)
- Search within package for specific types or methods
- Compare two package versions
- Generate markdown documentation from analysis
- Support for analyzing multiple packages at once
- Web-based UI for analysis results