Error Knowledge Base NuGet NU1107

NU1107: Version conflict detected

NuGet found conflicting requested versions of the same package and needs you to pin or upgrade dependencies so the graph converges.

Fix it fast

Most likely: Two dependency paths request incompatible versions of the same package, and NuGet needs the project to choose a version that makes the graph converge.

1. Confirm this is your error
error NU1107: Version conflict detected for 'PackageA'. Install/reference 'PackageA' v4.0.0 directly to resolve this issue.
2. Check the cause
dotnet restore -v normal
dotnet list package --include-transitive
grep -R "<PackageReference\|<PackageVersion" -n *.csproj Directory.Packages.props
3. Apply the safe fix
# Follow the NU1107 output and reference the suggested package version directly.
dotnet add package <package-id> --version <suggested-version>

# If using Central Package Management, update Directory.Packages.props instead of adding versions in each project.
dotnet restore
dotnet build
4. Verify it works
dotnet restore
dotnet list package --include-transitive
dotnet build
Don't use unsafe shortcuts
  • Do not add random version pins without following the conflict path in the NU1107 output.
  • Do not downgrade a dependency that other packages require at a higher version.
  • Do not update one package from a related family while leaving the rest pinned far behind.

What Broke in the Dependency Graph

This is NuGet refusing to continue with a dependency graph that does not make sense. The important detail is which versions or peer requirements disagree, not just the final error code.

Repair the dependency graph

Follow the conflict path in the NU1107 output to identify the parents.

Add an explicit PackageReference or PackageVersion for the conflicted package, or upgrade parents to converge.

Re-run:dotnet restore && dotnet build

Why Resolution Broke

Usually this comes down to two dependencies require different exact versions of the same package, after upgrading one package, related packages still pull older transitive versions, or central version pinning forces a version that contradicts another requirement.

Prove the Graph Is Clean Again

dotnet restore succeeds without NU1107, and dotnet list package --include-transitive shows a single version selected.

Validation

Re-run the failing command and confirm the original code/message is gone, and confirm expected artifacts or outputs exist (packages restored, build/publish succeeds).

Mechanism

NuGet tries to select a consistent version per package ID. If the graph includes incompatible version requirements, it emits NU1107 with suggested remediation.

Keep the Dependency Graph Healthy

To prevent this, upgrade related package families together to avoid version skew, and use CPM and automated dependency updates to manage convergence proactively.

Docs and source code

NU1107 message template

User-facing guidance suggests an explicit reference. - GitHub

  <data name="Log_VersionConflict" xml:space="preserve">
    <value>Version conflict detected for {0}. Install/reference {1} directly to project {2} to resolve this issue.</value>
  </data>

Need help or found a mistake? Contact RepoFlow support for questions.

Join our mailing list