Skip to content
Latchkey

NuGet "Unable to load the service index" - Feed Down in CI

NuGet could not reach the feed's index.json at all - the request never got a usable response. This is an infrastructure failure (DNS, network blip, or the feed itself being down), not a problem with your project. Self-healing managed runners like Latchkey auto-retry transient infrastructure failures so a momentary feed outage does not fail the whole job.

What this error means

Restore fails with "Unable to load the service index for source" and an underlying network/timeout/DNS error. It is often intermittent - re-running the job later succeeds with no code change.

dotnet
error NU1301: Unable to load the service index for source
https://pkgs.dev.azure.com/contoso/_packaging/internal/nuget/v3/index.json.

Common causes

The feed is temporarily down or overloaded

Azure Artifacts, GitHub Packages, or nuget.org had a transient outage, so the index.json request failed or timed out.

Network or DNS problem on the runner

A DNS hiccup, proxy issue, or brief network drop on the runner prevented the connection from completing.

How to fix it

Retry restore on transient failure

  1. Wrap restore in a short retry loop so a transient blip does not fail the job.
  2. Keep restore as its own step so the retry is scoped narrowly.
  3. Re-run the workflow if the feed was briefly down.
retry restore
for i in 1 2 3; do
  dotnet restore && break
  echo "restore failed (attempt $i), retrying..."
  sleep $((i*10))
done

Confirm the feed is up and reachable

  1. Open the feed status page or hit the index.json URL to confirm availability.
  2. Check the runner can resolve DNS and reach the host (proxy, firewall).
  3. On a managed self-healing runner the transient retry is automatic.

How to prevent it

  • Cache the NuGet global packages folder keyed on the lock file to reduce feed dependence.
  • Use an internal upstream/pull-through feed to smooth over public-feed blips.
  • Run CI on self-healing managed runners that auto-retry transient feed failures.

Frequently asked questions

What causes ""Unable to load the service index""?
Azure Artifacts, GitHub Packages, or nuget.org had a transient outage, so the index.json request failed or timed out.
How do I fix "Unable to load the service index"?
Retry restore on transient failure

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card