.NET NuGet package restore failure

`dotnet restore` or a build that implicitly runs restore could not download or resolve one or more NuGet packages.

dotnet-restore high confidence build

Matched signals

  • error NU
  • Package restore failed
  • NuGet restore
  • unable to find package
  • MSBuild error
  • Could not resolve SDK
  • NETStandard

.NET NuGet package restore failure

What this failure means

dotnet restore or a build that implicitly runs restore could not download or resolve one or more NuGet packages. The build cannot proceed until all dependencies are available.

Symptoms

Faultline looks for one or more of these log fragments:

error NU
Package restore failed
NuGet restore
unable to find package
MSBuild error
Could not resolve SDK
NETStandard

Diagnosis

dotnet restore or a build that implicitly runs restore could not download or resolve one or more NuGet packages. The build cannot proceed until all dependencies are available.

Fix steps

  1. Add feed credentials to NuGet.Config or as CI secrets for private feeds.
  2. Run dotnet restore --verbosity detailed to identify which package is failing.
  3. Update the package version to one that exists with dotnet list package --outdated.
  4. If you need an offline restore path, restore from a known packages cache such as dotnet restore --packages .nuget/packages.

Validation

  • dotnet restore completes successfully.
  • The CI build proceeds past the restore phase without the original NuGet error.

Why it matters

Common causes include a private NuGet feed that is not configured, a package version pinned in the project file that does not exist, or network access to nuget.org that is blocked in the CI environment.

Prevention

  • Commit NuGet.Config with feed URLs, but not credentials, to the repository.
  • Cache the NuGet packages directory between CI runs.
  • Pin package versions in *.csproj and update them deliberately.

Try it locally

dotnet restore
dotnet restore

How Faultline detects it

Use faultline explain dotnet-restore to see the full playbook.

faultline analyze build.log
faultline explain dotnet-restore

Generated from playbooks/bundled/log/build/dotnet-restore.yaml. Do not edit directly.

Try it on your own failed log

$ faultline analyze failed.log
Want this across every CI run? Faultline Teams tracks recurring failures across all your repos and surfaces patterns in a shared dashboard.