Skip to content
Latchkey

NuGet "Unable to find package" - Fix Missing Feed in CI

NuGet searched every configured source and never found a package with that id. The id either does not exist on any feed the runner can see, is misspelled, or the only feed that has it was briefly unreachable.

What this error means

Restore fails with Unable to find package <id> (or NU1101) and lists the sources it searched. A missing-feed or typo failure is deterministic; a failure that names a real feed and clears on re-run is a transient feed timeout.

dotnet
error: Unable to find package Contoso.Internal.Auth. No packages exist with this id
in source(s): nuget.org

Common causes

Private feed not configured on the runner

The package lives on an internal feed (Azure Artifacts, GitHub Packages, MyGet) that exists locally but was never added to the runner's nuget.config, so only nuget.org is searched.

Package id misspelled or unlisted

A typo in the PackageReference Include, or a package unlisted/renamed upstream, leaves no matching id on any feed.

Transient feed timeout

A correctly configured feed was briefly unreachable during restore, so NuGet fell back to the remaining sources and reported the package as not found.

How to fix it

Add the private feed to nuget.config

  1. Commit a repo-root nuget.config that declares every source the build needs.
  2. Reference feed credentials from CI secrets, not inline plaintext.
  3. Re-run restore and confirm the source list now includes the private feed.
nuget.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <clear />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="contoso" value="https://pkgs.dev.azure.com/contoso/_packaging/internal/nuget/v3/index.json" />
  </packageSources>
  <packageSourceCredentials>
    <contoso>
      <add key="Username" value="ci" />
      <add key="ClearTextPassword" value="${NUGET_TOKEN}" />
    </contoso>
  </packageSourceCredentials>
</configuration>

Verify the package id

  1. Search the feed UI for the exact id to confirm it exists and is spelled correctly.
  2. Fix the Include value on the PackageReference if it is a typo.
  3. If the package was unlisted, pin a still-published version or replace the dependency.

How to prevent it

  • Commit a repo-root nuget.config declaring all feeds the build needs.
  • Inject private-feed credentials from CI secrets at restore time.
  • On Latchkey, self-healing managed runners auto-retry transient feed timeouts so a brief NuGet outage does not fail restore on its own.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →