NU1100 error after cancelled NuGet restore leaves partial packages
26K reputation · 27 Feb 2023, 14:55 UTC
NU1100 after cancelled restore
When a NuGet restore is cancelled or times out, the CLI stops downloading further packages but leaves already extracted files in the global‑packages folder and the project’s obj directory.
This leaves the restore in an inconsistent state; subsequent builds may fail with NU1100 because referenced assemblies are missing or incomplete.
NuGet does not provide an automatic rollback, requiring users to delete the cache or restart the restore to regain a clean state.
What determines which packages are considered partially extracted, how can a build system detect this inconsistent state without a full clean, and is there a supported way to trigger a rollback or cleanup as part of the restore command?