NuGet Version Conflicts (NU1107) - Fix Unresolvable Constraints
NuGet found two requirement chains pinning mutually exclusive versions of one package and could not pick a single version that satisfies both. It reports NU1107 and asks you to add a direct reference to break the tie.
What this error means
Restore fails with NU1107 listing the two conflicting chains and their incompatible constraints. Like other resolver errors it is deterministic and reproduces locally with the same project graph.
error NU1107: Version conflict detected for System.Text.Json.
Install/reference System.Text.Json 8.0.0 directly to resolve this issue.
MyApp -> LibA 2.0.0 -> System.Text.Json (= 6.0.0)
MyApp -> LibB 3.0.0 -> System.Text.Json (= 8.0.0)Common causes
Two dependencies require exact, incompatible versions
When two chains use exact (=) constraints on different versions of the same package, no single version satisfies both and NuGet stops.
A stale dependency hasn’t been upgraded
An older package pins an old shared dependency. Upgrading it to a release that accepts the newer version removes the conflict.
How to fix it
Add a direct reference to unify the version
Pin the shared package directly at a version both chains accept (usually the higher one).
<PackageReference Include="System.Text.Json" Version="8.0.0" />Upgrade the lagging dependency
- Identify which chain pins the older version in the NU1107 message.
- Upgrade that package to a release that accepts the newer shared version.
- Re-run restore and confirm the conflict is gone.
How to prevent it
- Keep dependencies current so shared transitive packages stay compatible.
- Use central package management to pin shared packages once.
- Add a direct reference for any package multiple chains disagree on.