Skip to content
Latchkey

NuGet NU1605 Downgrade - Pin the Direct Reference in CI

This NU1605 downgrade is caused not by a transitive chain but by a ProjectReference: one project pins a lower direct version of a package than a project it consumes, so NuGet sees a downgrade across the project boundary.

What this error means

NU1605 names a chain that runs through a ProjectReference (e.g. App -> Core -> Newtonsoft.Json (>= 13) vs App -> Newtonsoft.Json (>= 12)). It is deterministic and tied to the direct versions each project pins.

dotnet restore output
error NU1605: Detected package downgrade: Newtonsoft.Json from 13.0.3 to 12.0.3.
 App -> Core.csproj -> Newtonsoft.Json (>= 13.0.3)
 App -> Newtonsoft.Json (>= 12.0.3)

Common causes

Consuming project pins a lower direct version

The top project directly references the package at a lower version than a project it depends on requires, forcing a downgrade across the ProjectReference.

Versions drifted between projects in the solution

Two projects evolved independently and now pin different direct versions of the same package, so one consumes the other at an incompatible version.

How to fix it

Raise the consuming project’s direct reference

Pin the top project’s direct reference at or above the version its dependency requires.

.csproj
<!-- App.csproj -->
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />

Centralize the version so projects cannot drift

Move the version into a single PackageVersion so every project resolves the same one.

Directory.Packages.props
<!-- Directory.Packages.props -->
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />

How to prevent it

  • Keep shared package versions identical across projects in a solution.
  • Adopt central package management so cross-project drift cannot occur.
  • Trace the NU1605 chain to find which project pins the lower version.

Related guides

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