The problem
Compiled assemblies often lack accessible source code or build records, making it difficult to identify which .NET framework they declare as their target.
An assembly's declared target is distinct from its runtime, SDK version, and actual compatibility.
Directory inventories need consistent results even when some binaries are native, malformed, or unreadable.
The solution
Design a read-only, cross-platform .NET CLI that inspects managed assembly metadata and reports the declared target framework without loading or executing the assembly.
The proposed dotnet framework inspect and scan commands would report declared target framework monikers and readable names.
The planned implementation uses System.Reflection.Metadata and PortableExecutable APIs to inspect binaries without executing their code.
Who it's for
Developers assessing compiled .NET binaries when source projects or build records are unavailable.
Intended for developers auditing legacy applications, planning modernization, or examining build artifacts.
All documented CLI commands and sample outputs are proposals, not currently available functionality.
How it works
Key capabilities and concepts. See the project documentation or source code for implementation details.
Proposed inspection of TargetFrameworkAttribute metadata in managed DLLs and EXEs
Inspect a managed DLL or EXE.
The proposed inspect command would read its declared TargetFrameworkAttribute without executing code.
Planned recursive directory scans and machine-readable JSON output
Scan a directory of binaries.
The proposed scan command would inventory candidates and continue past invalid files.
Explicit distinction between declared target, unknown metadata, and runtime compatibility
Use structured results.
Planned console and JSON outputs would distinguish detected, unknown, and unreadable cases.
Design decisions that matter
- Prefer explicit TargetFrameworkAttribute metadata over guesses from CLR versions.
Trust explicit metadata, not guesses.
CLR metadata versions do not reliably identify a framework target.
- Report unknown or unreadable targets rather than inventing a framework.
Never execute inspected assemblies.
The design favors read-only metadata inspection instead of dynamic loading.
- Separate metadata inspection from CLI parsing and directory traversal.
Preserve uncertainty.
A missing attribute or native executable must not be mislabeled as a supported target.
Explore the implementation
Requirements and proposed command contract only. The CLI has not yet been implemented or released.
The repository currently contains a requirements baseline and proposed CLI contract, not executable functionality.
There is no released binary, NuGet package, or functional CLI; see the repository for progress.