Unused central versions
Find PackageVersion entries that no affected project actually uses.
01PackageMedic scans SDK-style .NET projects for dependency drift, stale central versions, CPM bypasses, floating versions, vulnerabilities, deprecations, and PR graph changes—then traces every changed transitive to the direct package that caused it and can simulate one exact package candidate without editing your checkout. Opt-in immutable build/test evidence, CycloneDX 1.7, and unsigned in-toto analysis statements make the result CI-ready.
dotnet tool install --global PackageMedic.Tool --version 0.6.1
Each finding includes evidence, project context, source location when available, and a suggested next action.
Find PackageVersion entries that no affected project actually uses.
01Spot explicit package versions that silently diverge across projects.
02Catch PackageReference versions that bypass central management.
03Expose conflicting PackageVersion items in the effective project scope.
04Surface important NuGet codes such as NU1605, NU1107, and NU1109.
05Flag floating PackageVersion, Version, and VersionOverride declarations before they make restores drift.
06Turn official NuGet audit evidence into package, framework, advisory, and dependency-kind diagnostics.
07Preserve NuGet deprecation reasons and replacement guidance with direct/transitive context.
08PackageMedic evaluates the same MSBuild model your project uses, reads NuGet's resolved assets graph, and runs conservative rules designed to avoid noisy false positives.
› package-medic doctor ./MySolution.sln
Running dotnet restore for MySolution.sln…
Evaluating 12 projects…
PackageMedic 0.6.1
Scanned: 1 solution · 12 projects · 180 packages
PM001 warning: Central package version is not used
Package: Humanizer
Version: 2.14.1
File: Directory.Packages.props:18
0 errors · 1 warning · 0 informational
Replace a flat package diff with causal paths, dependency growth, source trust, and one reviewable gate for the pull request.
PMI004 Added transitive budget exceeded
Contoso.Web 4.0.0 → Contoso.Transport 3.2.0 → Contoso.Json 2.1.0
Added direct: 1 · Added transitive: 7
Blast radius: 7 · Source/content changes: 0/0
Impact Gate failed · 1 policy violation
Trace a changed transitive back to the direct package responsible for it.
Measure how many resolved changes one direct dependency introduced.
Gate source changes, SHA-512 content drift, allowlists, mapping, and unknown provenance.
Require committed lock files and locked mode where repository policy demands it.
Test one exact direct dependency candidate against restore, diagnostics, risk evidence, and the Impact Gate in two independent snapshots of the same commit.
› package-medic simulate Example.Package --to 2.0.0 . --verify test
Baseline HEAD restored in snapshot A
Candidate 2.0.0 restored in snapshot B
Resolved candidate: 2.0.0
Added transitives: 2 · Removed transitives: 1
PASS · restore + build + 214 tests
Runtime compatibility and package safety are not claimed
Baseline and candidate start from the same immutable clean commit with separate caches.
Only the validated version value changes; encoding, comments, whitespace, and quotes stay intact.
Distinguish a complete rejection from an incomplete operational result.
Each verdict states whether restore, build, or structured tests ran; runtime and package safety are never claimed.
Versioned configuration keeps the same rules on every machine. Baselines let established repositories block only regressions while known findings remain visible.
› package-medic init
Created .packagemedic.json
› package-medic baseline create . --output .packagemedic-baseline.json
Accepted findings now have portable fingerprints
› package-medic doctor . --fail-on none --fail-on-new warning
1 new · 18 existing · 2 resolved
Enable rules, tune severity, bound parallelism, set timeouts, and exclude portable paths.
Every exception requires a reason and stays visible in reports.
Keep existing debt visible while stopping fresh warnings in pull requests.
clean --dry-run previews high-confidence candidates; 0.6 has no apply path.
Generate JSON and SARIF from one analysis or run the official GitHub Action to place isolated findings beside the affected project files.
› package-medic doctor . --format json --output reports/medic.json --sarif-output reports/medic.sarif
Wrote json report to reports/medic.json
Wrote sarif report to reports/medic.sarif
PM001–PM008 mapped
Inventory · risk deltas · semantic PR graph changes
Annotate new findings by default, or opt into all/none.
SARIF 2.1.0 integrates with GitHub without changing project files.
Opt into vulnerability and deprecation data without a custom HTTP client.
Classify upgrades, downgrades, dependency-kind and PM007/PM008 risk changes without switching branches.
PackageMedic leaves your checkout untouched. It does not apply fixes, rewrite dependency files in place, or collect telemetry. Time Machine changes only an owned disposable snapshot.
Install the current stable release and run your first read-only scan.
package-medic doctor