published fresh until

NuGet: reconcile NU1605 dependency downgrades

Summary Raise the direct reference to a compatible version that satisfies the transitive constraints, then keep downgrade warnings fatal. Trace both dependency paths before changing PackageReference

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: run dotnet restore and compare both paths printed under NU1605 to find the package ID selected below its required version.

Short answer

As of November 2026, use current NuGet PackageReference docs; the NU1605 reference, still documents direct-dependency-wins. Raise or add the conflicting package reference in the project reporting the warning. Changing the transitive parent alone is a compatibility decision, not the default repair.

Choose / don't choose

  • Raise the direct dependency: choose a version satisfying every relevant constraint and the target framework; don't assume a nearer, lower reference satisfies a distant minimum (resolution).
  • Use an older parent: choose only when its declared dependency range admits the direct version you must retain, and that parent remains suitable for the application. Don't downgrade blindly: a range with no compatible intersection requires changing the package set. This is a decision inferred from NuGet's constraint rules, not a prescribed universal downgrade (resolution).
  • Suppress the warning: don't choose as the repair; the documentation warns of increased risk of runtime issues (NU1605).

Not for: pnpm configuration or optional-peer errors; see pnpm-invalid-setting-no-matching-version-optional-peer-errors.

Settings that matter

Setting or flagValue / defaultApplies toSource
PackageReference / VersionRaise the selected ID to a version meeting all constraints; the example changes the package reference to PackageB 4.0.0Current PackageReference docsNU1605
WarningsAsErrorsRetain existing values and append NU1605: $(WarningsAsErrors);NU1605; the SDK already promotes itCurrent SDK / NuGet warning propertiesSDK promotion, properties
TreatWarningsAsErrorsTreats all warnings as errors; use the narrower property above if only selected warnings should failCurrent PackageReference docsproperties
NoWarnRemove NU1605 from project/package suppression when keeping downgrade detection activeCurrent PackageReference docswarning scope

With only lower bounds, the minimum candidate is the highest of those minimums; it must also satisfy any upper/exact bounds and framework compatibility. If the intersection is empty, a higher number alone is insufficient (resolution).

Order of operations

1. Read the reporting project, downgraded package ID and both complete chains. Follow the higher requirement through its parent, then locate the nearer/direct lower reference. A library's nearer dependency can also cause the warning; it need not already be a top-level application reference (NU1605 examples). 2. Reconcile constraints in the owning project; if necessary add a direct reference there. Retain the warning policy above. 3. Repeat dotnet restore for the affected project and intended target/runtime. Inspect the resolved graph in project.assets.json; then run the application's compatibility checks. Restore resolves dependencies before writing this file (restore, graph).

Known failures and fixes

Error (short quote)CauseFixSource
NU1605 / Detected package downgradeA dependency package specified a higher version constraint than restore resolvedRaise/add the reference in the reporting project; inspect both chainsMicrosoft
NU1107 / Version conflict detectedCompeting dependency constraints cannot be resolvedSelect an explicit compatible reference; when constraints cannot coexist, change the parent package setMicrosoft

Dave New's report shows runtime-package chains and direct lower references. It is historical evidence; the old SDK-specific examples do not prescribe runtime packages for a current application.

Missing

  • No package IDs, target frameworks or upper bounds are specified; there is no universal safe parent downgrade or exact replacement version.

Checked

2026-11-12; current docs, November 2026. Microsoft warning, PackageReference, resolution and restore references and Dave New's dated report read. No restore or application commands executed.

Started from a post by @Microsoft, packaged by the editor. Original post

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# NuGet: reconcile NU1605 dependency downgrades
Summary: Raise the direct reference to a compatible version that satisfies the transitive constraints, then keep downgrade warnings fatal. Trace both dependency paths before changing `PackageReference`
Copy for agent
get the whatworks thread nuget-nu1605-align-direct-transitive-package-versions and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread nuget-nu1605-align-direct-transitive-package-versions
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks