Getting the NU1605: Detected package downgrade warning or error in Visual Studio? This usually happens when different NuGet packages require different versions of the same dependency.

In this guide, you'll learn what NU1605 means, why it occurs, how to identify the conflicting packages, and several reliable ways to fix it in a .NET or Visual Studio project.


๐Ÿ“Œ What Is NU1605?

NU1605 is a NuGet package downgrade warning that occurs when NuGet resolves a dependency to a lower version than the version requested by another package.

For example, imagine your project has these dependencies:

PackageA โ†’ requires Newtonsoft.Json 13.0.3
PackageB โ†’ requires Newtonsoft.Json 12.0.3

If your project directly references an older version, NuGet may detect that the dependency has effectively been downgraded.

You may see an error similar to:

error NU1605: Detected package downgrade:
Newtonsoft.Json from 13.0.3 to 12.0.3.
Reference the package directly from the project to select a different version.

The exact package names and versions will vary depending on your project.


๐Ÿ” Why Does NU1605 Happen?

NU1605 is usually caused by a dependency version conflict. One package requires a newer version of a dependency while another part of the project brings in an older version.

A typical dependency tree might look like this:

YourProject
โ”‚
โ”œโ”€โ”€ PackageA
โ”‚   โ””โ”€โ”€ DependencyX 5.0.0
โ”‚
โ””โ”€โ”€ PackageB
    โ””โ”€โ”€ DependencyX 4.0.0

NuGet has to determine which version of DependencyX should be used.

If the resolved version is lower than the version requested by another dependency, NU1605 can occur.


๐Ÿงช Example of NU1605

Suppose your project contains:

<PackageReference Include="PackageA" Version="2.0.0" />
<PackageReference Include="PackageB" Version="1.5.0" />
<PackageReference Include="DependencyX" Version="4.0.0" />

Now imagine that PackageA requires DependencyX 5.0.0.

Your project explicitly references DependencyX 4.0.0, creating a version mismatch.

NuGet may report:

NU1605: Detected package downgrade

๐Ÿ”Ž How to Find the Package Causing NU1605

The first thing you should do is read the complete NU1605 message in the Visual Studio Error List.

The message normally contains a dependency chain showing which package requires the newer version and which package introduced the older version.

For example:

PackageA 2.0.0
  โ†’ DependencyX (โ‰ฅ 5.0.0)

PackageB 1.5.0
  โ†’ DependencyX (โ‰ฅ 4.0.0)

Project
  โ†’ DependencyX 4.0.0

In this example, DependencyX 4.0.0 is the package you should investigate.


๐Ÿ› ๏ธ Fix 1: Update the Direct Package Reference

One of the most common solutions is to explicitly reference a compatible version of the dependency in your project.

For example, if the project currently contains:

<PackageReference Include="DependencyX" Version="4.0.0" />

and another package requires version 5.0.0 or later, update the reference:

<PackageReference Include="DependencyX" Version="5.0.0" />

After changing the package version, restore the NuGet packages and rebuild the project.

In many cases, this resolves NU1605 immediately.


๐Ÿ› ๏ธ Fix 2: Update the Package Causing the Conflict

Sometimes the better solution is to update the package that depends on the older version.

In Visual Studio:

  1. Right-click your project.
  2. Select Manage NuGet Packages.
  3. Open the Updates tab.
  4. Check for newer versions of the packages involved in the conflict.
  5. Update compatible packages.
  6. Restore and rebuild the project.

This can eliminate the conflicting dependency instead of forcing a version manually.


๐Ÿ› ๏ธ Fix 3: Check Transitive Dependencies

The package you need to update may not be directly installed in your project. It may be a transitive dependency.

A transitive dependency is a package that your project receives through another NuGet package.

For example:

YourProject
   โ†“
PackageA
   โ†“
DependencyX

Your project references PackageA, but DependencyX is brought into the project automatically.

In this situation, inspect the dependency tree before changing package versions manually.


๐Ÿ› ๏ธ Fix 4: Use the Visual Studio NuGet Package Manager

You can inspect package versions directly from Visual Studio.

Open:

Right-click Project
โ†’ Manage NuGet Packages
โ†’ Installed

Look for packages involved in the NU1605 message and compare their versions.

If one package is significantly older than the others, check whether an update is available.


๐Ÿ› ๏ธ Fix 5: Check the .csproj File

For SDK-style .NET projects, package references are normally stored in the .csproj file.

For example:

<ItemGroup>
  <PackageReference Include="PackageA" Version="2.0.0" />
  <PackageReference Include="DependencyX" Version="4.0.0" />
</ItemGroup>

Check whether the dependency causing NU1605 is explicitly referenced with an older version.

If appropriate, update it to a compatible version.


๐Ÿงน Fix 6: Clean and Restore NuGet Packages

After changing package versions, it can sometimes help to clean the project and restore the dependencies.

In Visual Studio, try:

Build
โ†’ Clean Solution

Build
โ†’ Rebuild Solution

You can also restore NuGet packages from the solution or project context menu.

For SDK-style projects, you can also use the .NET CLI:

dotnet restore

If the problem persists, close Visual Studio and remove the project's bin and obj folders before restoring again.


โš ๏ธ Should You Ignore NU1605?

Generally, don't ignore NU1605 blindly.

A package downgrade can sometimes result in an incompatible dependency being used at runtime.

If you know that the selected version is compatible and your project intentionally pins that version, you may have a reason to suppress the warning. However, fixing the dependency conflict is usually preferable.


๐Ÿ’ก Best Practice for NuGet Version Conflicts

When resolving NU1605, don't simply change random package versions until the error disappears.

A better approach is:

  1. Read the complete NU1605 message.
  2. Identify the dependency causing the conflict.
  3. Check which package requires the newer version.
  4. Check which package introduces the older version.
  5. Update compatible packages where possible.
  6. Use a direct package reference when appropriate.
  7. Restore and rebuild the project.
  8. Test the application after the change.

๐Ÿ”— NU1605 vs Other NuGet Version Conflicts

NU1605 is only one type of NuGet dependency conflict. You may also encounter errors such as NU1107, which indicates a version conflict that NuGet cannot resolve automatically.

If you're dealing with a broader package-version problem, see our complete guide:

๐Ÿ‘‰ How to Fix NuGet Package Version Conflicts in Visual Studio


๐ŸŽฏ Conclusion

NU1605 usually means that NuGet has detected a package dependency being resolved to a lower version than another dependency expects.

The most reliable solution is to identify the dependency chain, update incompatible packages, or explicitly reference an appropriate version of the conflicting dependency.

Don't just suppress NU1605 without understanding the dependency conflict. A clean dependency graph makes your .NET project easier to maintain and less likely to encounter package-related problems later.

๐Ÿ“š More NuGet & Visual Studio Tutorials

Having another NuGet dependency problem? Read the complete NuGet Package Version Conflicts guide โ†’

๐Ÿค– AlgoLassi Assistant Have a question about this tutorial?

Ask AlgoLassi and get an answer plus the tutorials worth studying next.

Ask a question

๐Ÿ’ฌ Comments

Sign in with Google to publish immediately, or comment anonymously and wait for approval.

Comments will appear here when available.