dotnet restore "Unable to find package X" not on source(s) in CI
NuGet queried every configured source and none of them publishes a package with that id. The name is wrong, the package is private and its feed is not configured, or the source list is missing an entry.
What this error means
restore fails with "Unable to find package X. No packages exist with this id in source(s): nuget.org" or "Package X is not found on source(s)".
error NU1101: Unable to find package Contoso.Internal. No packages exist with this id
in source(s): nuget.orgCommon causes
The package id is misspelled or private
The id does not exist on the listed sources: a typo, or a private package whose feed is not among the configured sources.
The hosting source is not configured in CI
The package lives on a private feed that the runner's nuget.config does not include, so restore only searches nuget.org.
How to fix it
Add the source that hosts the package
- Confirm the exact package id on the feed that publishes it.
- Add that feed as a source in
nuget.config(with credentials if private). - Re-run restore so NuGet searches the correct source.
<packageSources>
<add key="private" value="https://pkgs.internal.example.com/nuget/v3/index.json" />
</packageSources>Correct the package id
If the id is a typo, fix the PackageReference Include to the real published id and restore again.
<PackageReference Include="Contoso.Internal.Client" Version="2.1.0" />How to prevent it
- Commit a
nuget.configthat lists every feed the solution needs. - Verify package ids against the feed, not the assembly name.
- Keep private feeds and their credentials configured for every CI repo.