dotnet-inspect
A CLI tool for inspecting .NET assemblies and NuGet packages.
Requirements
- .NET 10+ SDK
Installation
Use dnx to run without global installation (like npx for Node):
dnx dotnet-inspect -y -- <command>
Important:
- Always use
-yto skip the interactive confirmation prompt (which breaks LLM tool use). New package versions also trigger this prompt. - Always use
--to separate dnx options from tool arguments. Without it,--helpshows dnx help, not dotnet-inspect help.
Getting Started
Run this command for complete usage instructions:
dnx dotnet-inspect -y -- llmstxt
DO THIS FIRST. The llmstxt command provides comprehensive examples for all commands and workflows.
Quick Reference
| Command | Purpose |
|---|---|
package <name> |
Inspect NuGet package metadata, files, versions, dependencies |
assembly <path> |
Inspect .NET assembly info, SourceLink/determinism audit |
api <type> |
View public API surface of a type |
type <type> |
Show type shape with hierarchy and members (tree view) |
find <pattern> |
Search for types across packages, assemblies, or frameworks |
diff <type> |
Compare API surfaces between package versions |
llmstxt |
Show complete usage examples |
Example Usage
# Package exploration
dnx dotnet-inspect -y -- package System.Text.Json
dnx dotnet-inspect -y -- package System.CommandLine --files
dnx dotnet-inspect -y -- package System.Text.Json --versions -n 1 # latest only
dnx dotnet-inspect -y -- package System.Text.Json --versions # all versions
# View type APIs
dnx dotnet-inspect -y -- api JsonSerializer --package System.Text.Json
dnx dotnet-inspect -y -- api Command --package System.CommandLine -m SetAction
# Compare versions
dnx dotnet-inspect -y -- diff JsonSerializer --package System.Text.Json@9.0.0..10.0.0
# Type hierarchy
dnx dotnet-inspect -y -- type Command --package System.CommandLine
# Search for types (use find when unsure where a type lives)
dnx dotnet-inspect -y -- find "*Logger*" --framework runtime
dnx dotnet-inspect -y -- find JsonSerializer --package System.Text.Json
dnx dotnet-inspect -y -- find ILogger --framework runtime --package Microsoft.Extensions.Logging
Package vs Platform
Some assemblies exist in both NuGet packages and the .NET platform (installed SDK):
# From NuGet package (downloads if needed)
dnx dotnet-inspect -y -- api JsonSerializer --package System.Text.Json@9.0.0
# From installed SDK (no download, uses local SDK)
dnx dotnet-inspect -y -- api JsonSerializer --platform System.Text.Json
When to use each:
- Package (
--package): Third-party libraries, specific versions, packages not in SDK - Platform (
--platform): .NET runtime/SDK assemblies, comparing SDK versions, no network needed
Use find to search across both:
# Search both platform and package together
dnx dotnet-inspect -y -- find JsonSerializer --framework runtime --package Newtonsoft.Json
The find command is the best starting point when you're unsure where a type lives.
When to Use This Skill
- Getting the latest version of a NuGet package
- Exploring what types/APIs a NuGet package provides
- Searching for types by pattern across packages or frameworks
- Understanding method signatures and overloads
- Comparing API changes between package versions
- Auditing assemblies for SourceLink and determinism
- Finding types matching a pattern (
--filter "Progress*") - Getting documentation from source (
--docs)
Converted and distributed by TomeVault — claim your Tome and manage your conversions.