Skip to content

Restore errors and warnings

Justin Emgarten edited this page May 10, 2017 · 19 revisions

This document contains a list of all warnings and errors that may occur during restore.

Updated Errors in 4.3.0

Non-specific errors and warnings

NU1000

Issue

Generic error from NuGet.

NU1500

Issue

Generic warning from NuGet.

Missing packages and projects

NU1100

Issue

A dependency group not be resolved. This is a generic issue for types that are not packages or projects.

Common causes

The project contains a dependency on an item that does not exist.

Example

Unable to resolve System.Missing for net45

NU1101

Issue

The package id cannot be found on any sources.

Common causes

The correct package source is missing or the package id has a typo.

Example

Unable to find package System.Missing. No packages exist with this id in source(s): dotnet-core, dotnet-roslyn, NuGet.org

NU1102

Issue

The package id is found but a version within the specified dependency range cannot be found on any of the sources.

Common causes

The correct package source is missing or the dependency range is incorrect. The range might be specified by a package and not the user.

The user may need to switch to an available version if this package is referenced by the project directly.

Example

Unable to find package NuGet.Versioning with version (>= 9.0.1)
  - Found 30 version(s) in NuGet.org [ Nearest version: 4.0.0 ]
  - Found 10 version(s) in dotnet-buildtools [ Nearest version: 4.0.0-rc-2129 ]
  - Found 9 version(s) in NuGetVolatile [ Nearest version: 3.0.0-beta-00032 ]
  - Found 0 version(s) in dotnet-core
  - Found 0 version(s) in dotnet-roslyn

NU1103

Issue

No stable versions were found in the dependency range. Pre-release versions were found but are not allowed.

Common causes

The project specified a stable version for the dependency range. Users need to change this to include pre-release versions.

Example

Unable to find a stable package NuGet.Versioning with version (>= 3.0.0)
  - Found 10 version(s) in dotnet-buildtools [ Nearest version: 4.0.0-rc-2129 ]
  - Found 9 version(s) in NuGetVolatile [ Nearest version: 3.0.0-beta-00032 ]
  - Found 0 version(s) in dotnet-core
  - Found 0 version(s) in dotnet-roslyn

NU1104

Issue

A ProjectReference points to a file that does not exist.

Common causes

The project file is missing from disk or the reference is incorrect.

Example

Project reference does not exist 'c:\a.csproj'. Check that the project reference is valid and that the project file exists.

NU1105

Issue

The project file exists but no restore information was provided for it.

Common causes

In Visual Studio this could mean that the project is unloaded. From the command line this could mean that the file is corrupt or that it does not contain the custom after imports target needed for restore to read the project.

Example

Unable to read project information for 'c:\a.csproj'. The project file may be invalid or missing targets required for restore.

NU1106

Issue

Dependency constraints cannot be resolved.

Common causes

Packages contain dependency on exact versions of a package instead of open ended ranges.

Example

Unable to satisfy conflicting requests for {id}: {conflict path} Framework: {target graph}

Compatibility

NU1201

Issue

A dependency project does not contain a framework compatible with the current project.

Common causes

The project's target framework is a higher version than the consuming project.

Example

Project ServerWeb is not compatible with netstandard1.3 (.NETStandard,Version=v1.3). Project ServerWeb supports:
  - netstandard1.6 (.NETStandard,Version=v1.6)
  - netcoreapp1.0 (.NETCoreApp,Version=v1.0)

NU1202

Issue

A dependency package does not contain any assets compatible with the project.

Common causes

The package does not support the project's target framework.

Example

Package System.ComponentModel.EventBasedAsync 4.0.11 is not compatible with netstandard1.3 (.NETStandard,Version=v1.3). Package System.ComponentModel.EventBasedAsync 4.0.11 supports:
  - monoandroid10 (MonoAndroid,Version=v1.0)
  - monotouch10 (MonoTouch,Version=v1.0)
  - net45 (.NETFramework,Version=v4.5)
  - netcore50 (.NETCore,Version=v5.0)
  - netstandard1.0 (.NETStandard,Version=v1.0)
  - netstandard1.3 (.NETStandard,Version=v1.3)
  - portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
  - win8 (Windows,Version=v8.0)
  - wp8 (WindowsPhone,Version=v8.0)
  - wpa81 (WindowsPhoneApp,Version=v8.1)
  - xamarinios10 (Xamarin.iOS,Version=v1.0)
  - xamarinmac20 (Xamarin.Mac,Version=v2.0)
  - xamarintvos10 (Xamarin.TVOS,Version=v1.0)
  - xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)

NU1203

Issue

The package does not support the project's RuntimeIdentifier.

Common causes

The package does not support the current RuntimeIdentifier. Change the RuntimeIdentifiers used in the project if needed.

Example

System.Example 1.0.0 provides a compile-time reference assembly for a.dll on net461, but there is no compatible run-time assembly.

Invalid inputs

NU1501

Issue

The project restore is attempting to operate on was not found.

Common causes

The project is missing.

Example

The folder 'c:\projects\a' does not contain a project to restore.

NU1502

Issue

```RuntimeSupports`` contains an invalid profile.

Common causes

The supports profile was not found in a runtime.json file from the current dependency packages.

Example

Unknown Compatibility Profile: aaa

Unexpected package versions

NU1601

Issue

A direct project dependency was bumped to a higher version than the project specified.

Common causes

Another dependency package required a higher version and bumped the package up.

Example

Dependency specified was NuGet.Versioning (>= 3.5.0) but ended up with NuGet.Versioning 4.0.0.

NU1602

Issue

A package dependency is missing a lower bound. This does not allow restore to find the best match. Each restore will float downwards trying to find a lower version that can be used. This means that restore goes online to check all sources each time instead of using the packages that already exist in the user package folder.

Common causes

This is usually a package authoring error.

Example

NuGet.Packaging 4.0.0 does not provide an inclusive lower bound for dependency NuGet.Versioning (> 3.5.0). An approximate best match of 3.6.0 was resolved.

NU1603

Issue

A package dependency specified a version that could not be found. A higher version was used instead, which differs from what the package was authored against.

This means that restore did not find the best match. Each restore will float downwards trying to find a lower version that can be used. This means that restore goes online to check all sources each time instead of using the packages that already exist in the user package folder.

Common causes

The package sources do not contain the expected lower bound version. If the package expected has not been released then this may be a package authoring error.

Example

NuGet.Packaging 4.0.0 depends on NuGet.Versioning (>= 4.0.0) but 4.0.0 was not found. An approximate best match of 5.0.0 was resolved.

NU1604

Issue

A project dependency does not define a lower bound.

This means that restore did not find the best match. Each restore will float downwards trying to find a lower version that can be used. This means that restore goes online to check all sources each time instead of using the packages that already exist in the user package folder.

Common causes

The project's PackageReference Version attribute should be updated to include a lower bound.

Example

Project dependency NuGet.Versioning (<= 9.0.0) does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.

NU1605

Issue

A dependency package specified a version constraint on a higher version of a package than restore ultimately resolved.

Common causes

Nearest wins when resolving packages. A nearer package in the graph may have overridden a distant package.

Example

Detected package downgrade: NuGet.Versioning from 4.0.0 to 3.5.0
  NuGet.Packaging 3.5.0 -> NuGet.Versioning 3.5.0
  NuGet.Commands 4.0.0 -> NuGet.Configuration 4.0.0 -> NuGet.Versioning 4.0.0

Resolver conflicts

NU1606

Issue

A circular dependency was detected.

Common causes

A package is authored incorrectly.

Example

Cycle detected: A -> B -> A

NU1607

Issue

Unable to resolve dependency constaints between packages.

Common causes

Packages with dependency constaints on exact versions do not allow other packages to increase the version if needed.

Example

Version conflict detected for NuGet.Versioning. Reference the package directly from the project to resolve this issue.
  NuGet.Packaging 3.5.0 -> NuGet.Versioning (= 3.5.0)
  NuGet.Configuration 4.0.0 -> NuGet.Versioning (= 4.0.0)

Package fallback

NU1701

Issue

PackageTargetFallback was used to select assets from a package. This is a warning to let the user know that the assets may not be 100% compatible.

Common causes

The package does not support the project framework.

Example

Package 'NuGet.Versioning' was restored using 'portable-net45+win8' instead the project target framework 'netstandard1.5'. This may cause compatibility problems.

Feed warnings

NU1801

Issue

An error occurred when reading the feed. IgnoreFailedSources was set to true, converting it to a non-fatal warning. This could contain any message and is generic.

Common causes

The source is invalid.

Errors in 4.2.0

Code Project Group Message Fields Comments
DependencyResolver Http The feed {0} lists package {1} but multiple attempts to download the nupkg have failed. The feed is either invalid or required packages were removed while the current operation was in progress. Verify the package exists on the feed and try again uri, package Feed is likely corrupt, recently added this message
NuGet.Commands resolver Failed to resolve conflicts for {0} graph
NuGet.Commands resolver Unable to satisfy conflicting requests for {0}: {1} packages combines all conflicts into a single message
NuGet.Commands compat {0} {1} provides a compile-time reference assembly for {2} on {3}, but there is no compatible run-time assembly package, framework Log_MissingImplementationFx
NuGet.Commands compat {0} {1} provides a compile-time reference assembly for {2} on {3}, but there is no run-time assembly compatible with {4} package, framework Log_MissingImplementationFxRuntime
NuGet.Commands compat Package {0} {1} is not compatible with {2} package, framework Log_PackageNotCompatibleWithFx (complete message)
NuGet.Commands compat Project {0} is not compatible with {1} project, framework Log_ProjectNotCompatibleWithFx
NuGet.Commands notfound Unable to resolve {0} for {1} project, graph A package cannot be found on the feeds. (Highest priority to improve )
NuGet.Commands resolver Cycle detected: a -> b -> a packages circular dependency
NuGet.Commands resolver Version conflict detected for {0}
NuGet.Commands summary One or more projects are incompatible with {0} project remove this?
NuGet.Commands summary One or more packages are incompatible with {0} project remove this?
NuGet.Commands input The project {0} does not specify any target frameworks in {1} project, path
NuGet.Protocol http <http exception> PromptForProxyCredentialsAsync
NuGet.Procotol http Failed to download package {0} from {1} <exception> package, source download error
NuGet.Commands package Unknown build action nuspec contains invalid contentFiles data
NuGet.Commands disk Failed to find a project to restore in the folder {0} UnauthorizedAccessException
NuGet.Commands input Ambiguous project name {0} project root project has a duplicate
NuGet.Commands internal Missing external reference metadata for {0} project project data was not provided, internal issue
NuGet.Commands input Invalid input {0}. Valid file names are project.json or *.project.json no longer needed?
NuGet.Commands input File not found {0} path input file was not found
NuGet.Protocol feed InvalidDataException {0} Url invalid registration file InvalidDataException(registrationUri.AbsoluteUri)
NuGet.Protocol feed The JSON document is not an object.
NuGet.Protocol feed The JSON document is not complete.
NuGet.Protocol feed An error occurred while retrieving package metadata for {0} from source {1} package, source exception from source
NuGet.Protocol feed Error downloading {0} from {1}
NuGet.Protocol feed The V2 feed at {0} returned an unexpected status code {1} {2}
NuGet.Protocol feed The path {0} for the selected source could not be resolved.

Warnings in 4.2.0

Code Project Group Message Fields Comments
NuGet.Build.Tasks Input Unable to find a project to restore!
NuGet.Protocol Http An invalid cache entry was found for URL {0} and will be replaced Uri thrown for any invalid data
NuGet.Protocol Http <Message from server> This contains whatever the server wants to display to the user from X-NuGet-Warning
NuGet.Protocol Http Unable to find package Package Id
NuGet.Protocol Nupkg The file {0} is corrupt path Nupkg is corrupt or unreadable
NuGet.Protocol Local The folder {0} contains an invalid version path v3 folder with invalid sub folder
NuGet.Protocol Local <File system exception message>
NU1501 NuGet.Commands Input The folder {0} does not contain a project to restore path
NuGet.Commands Package Dependency specified was {0} {1} but ended up with {2} {3} packages Version bumped
NuGet.Commands Project Package {0} was restored using {1} instead the project target framework {2}. This may cause compatibility problems package, framework imports
NuGet.Commands Package Detected package downgrade: {0} from {1} to {2} package, versions Downgrade warning
NuGet.Commands Input Unknown Compatibility Profile: {0} compat profile bad input from project
NU1701 NuGet.Commands Project Package {0} was restored using {1} instead the project target framework {2}. This may cause compatibility problems. package, fallback, framework

Contributing

What's Being Worked On?

Check out the proposals in the accepted & proposed folders on the repository, and active PRs for proposals being discussed today.

Common Problems

Clone this wiki locally