NuGet "NU1102: Unable to find package with version" in CI
Unlike NU1101, the package id was found - but no published version satisfies the requested range. NU1102 lists how many versions exist and the nearest one, which tells you whether you pinned a version that was never published or one the feed has not mirrored yet.
What this error means
Restore fails with NU1102 showing the requested range and a "Found N version(s)" line with the nearest available version. It is deterministic for a given feed state.
error NU1102: Unable to find package Polly with version (>= 9.9.9)
- Found 42 version(s) in nuget.org [ Nearest version: 8.4.1 ]Common causes
A version was pinned that does not exist
A typo in the version, or a version that was yanked/never published, leaves no candidate in the requested range.
The private feed has not mirrored the version
A pull-through or upstream feed has not yet ingested the newest version, so CI sees an older set than a developer machine pointed at the public feed.
How to fix it
Pin a version that is actually published
- Read the "Nearest version" hint in the error to see what the feed has.
- Update the
PackageReferenceVersion to a published value. - Re-run restore to confirm resolution.
<PackageReference Include="Polly" Version="8.4.1" />Refresh the upstream/pull-through feed
- If using a mirror, trigger or wait for it to ingest the requested version from upstream.
- Confirm the version now appears in the feed UI.
- Re-run the build.
How to prevent it
- Pin only versions you have confirmed exist on the CI feed, not just locally.
- Use a lock file so version resolution is reproducible across machines.
- Watch for upstream ingestion lag when relying on a mirror feed.