Install and run the first diagnosis.
PackageMedic is a cross-platform global .NET tool. A first scan takes one install command and one repository path.
Requirements
- .NET 8 or a newer compatible runtime.
- A .NET SDK capable of loading the SDK-style projects being analyzed.
- Projects targeting .NET 8, 9, or 10 are supported when their required SDK is installed.
Install the stable tool
dotnet tool install --global PackageMedic.Tool --version 0.6.1To update an existing global installation:
dotnet tool update --global PackageMedic.ToolConfirm the executable and documentation version match:
package-medic --versionRun the first scan
# Current directory
package-medic doctor
# One project
package-medic doctor ./src/MyProject/MyProject.csproj
# A solution or solution XML file
package-medic doctor ./MySolution.sln
package-medic doctor ./MySolution.slnx
# Every discoverable project under a directory
package-medic doctor ./srcRead the result
Each diagnostic shows a stable PM code, severity, explanation, evidence, affected project or scope, source location when available, suggested action, and confidence.
| Exit | Meaning | CI interpretation |
|---|---|---|
0 | The scan completed below the selected threshold. | Pass |
1 | At least one effective diagnostic reached the threshold. | Policy failure |
2 | Usage, configuration, restore, audit, or analysis failed. | Operational failure |
Version 0.6.1 defaults to failing on warnings. To explore a repository without failing the command, use --fail-on none.
package-medic doctor . --fail-on none --verbosity detailedRecommended next steps
- Review every current finding and confirm the evidence.
- Run
package-medic initto create repository policy. - Create a baseline only after accepted findings have been reviewed.
- Add the GitHub Action with a new-only failure gate.