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
- Add feed credentials to
NuGet.Configor as CI secrets for private feeds. - Run
dotnet restore --verbosity detailedto identify which package is failing. - Update the package version to one that exists with
dotnet list package --outdated. - If you need an offline restore path, restore from a known packages cache such as
dotnet restore --packages .nuget/packages.
Validation
dotnet restorecompletes 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.Configwith feed URLs, but not credentials, to the repository. - Cache the NuGet packages directory between CI runs.
- Pin package versions in
*.csprojand 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.