dotnet
package_management
ai_generated
true
error NU1101: Unable to find package 'PackageName'. No packages exist with this id in source(s): nuget.org
ID: dotnet/nuget-restore-failed
88%Fix Rate
90%Confidence
70Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 8 | active | — | — | — |
Root Cause
NuGet restore failures occur when packages cannot be downloaded or resolved. Causes include missing package sources, network issues, private feed authentication failures, or deleted/unlisted packages. Fix by verifying NuGet sources, credentials, and package availability.
genericWorkarounds
-
90% success Verify and configure NuGet package sources in nuget.config
Check nuget.config exists at the solution root. Ensure the correct sources are listed: dotnet nuget list source. Add missing sources: dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org. For private feeds, add credentials: dotnet nuget update source PrivateFeed -u username -p token --store-password-in-clear-text
-
85% success Clear local NuGet caches and restore with verbosity to diagnose
Run 'dotnet nuget locals http-cache --clear' (clears only the HTTP cache, not all packages). Then 'dotnet restore --verbosity detailed' to see exactly which source is being queried and what error occurs for each package resolution attempt
Dead Ends
Common approaches that don't work:
-
Deleting the global NuGet cache and re-downloading all packages
65% fail
If the package is genuinely unavailable or the source is misconfigured, clearing cache just wastes bandwidth re-downloading all other packages. The original problem remains after cache rebuild
-
Vendoring NuGet packages by committing the packages folder to source control
70% fail
Bloats the repository with binary files, causes merge conflicts, and does not solve the underlying source/authentication issue. Packages become stale and cannot be easily updated
Error Chain
Leads to:
Frequently confused with: