en

pcpm doctor

Diagnose common environment issues.

pcpm doctor

pcpm doctor runs a battery of sanity checks against your environment and reports any that fail. Use it when something isn’t working and you don’t know why.

Checks

CheckWhat it does
dotnet-sdkDetects the dotnet SDK, prints the version.
dotnet-restoreRuns dotnet restore against a scratch project.
store-integrityWalks the store, verifies every hash.
store-writableTries to write a small file into the store.
feed-reachabilityHEAD requests every feed in pcpm.json.
feed-authIf credentials are set, verifies them.
lockfile-consistencyValidates the lockfile against CPM.
msbuild-targetVerifies the pcpm.MsBuild target is reachable.

Output

✓ dotnet-sdk            10.0.202
✓ dotnet-restore        0.4s
✓ store-integrity       4,231 packages, 0 hash mismatches
✓ store-writable        ok
✓ feed-reachability     nuget.org (200 OK)
✓ feed-auth             nuget.org (no credentials needed)
✓ lockfile-consistency  ok
✗ msbuild-target        not found — install pcpm.MsBuild for build-time integration

1 issue found. See `pcpm doctor --fix` for repair options.

Options

FlagEffect
--fixTry to repair any issues that are auto-repairable.
--jsonOutput as JSON.
--quietSuppress passing checks; only show failures.

Common fixes

pcpm doctor --fix can resolve:

  • Missing Directory.Packages.props (regenerates from pcpm.json).
  • Stale store entries with mismatched hashes (re-downloads).
  • Missing pcpm.MsBuild target (logs the install command; does not install it for you).

It does not fix:

  • Network errors (you have to be online).
  • Authentication errors (check your environment variables).
  • A wrong dotnet SDK version (run dotnet --list-sdks to see what you have).

See also