简体   繁体   中英

NuGet Version Conflict

I am trying to install a package (produced internally) and get a "weird" conflict.

It's weird because the conflict is coming from the same installed package (not two different installed packages).

Nuget is essentially reporting that "YadaYada.Amazon.Api 20.340.63" requires two conflicting versions of "Microsoft.AspNetCore.JsonPatch".

I have tried adding either of the versions explicitly to "YadaYada.Amazon.Api" and it does not help.

Please advise how to get around this issue?

Install-Package : NU1107: Version conflict detected for Microsoft.AspNetCore.JsonPatch. Install/reference Microsoft.AspNetCore.JsonPatch 3.1.10 directly to project BubbleBoy.AutoParts.Deploy to resolve this issue. 
 BubbleBoy.AutoParts.Deploy -> YadaYada.Amazon.Api 20.340.634 -> Microsoft.AspNetCore.Mvc.NewtonsoftJson 3.1.10 -> Microsoft.AspNetCore.JsonPatch (>= 3.1.10) 
 BubbleBoy.AutoParts.Deploy -> YadaYada.Amazon.Api 20.340.634 -> Microsoft.AspNetCore.App 2.1.0 -> Microsoft.AspNetCore.JsonPatch (= 2.1.0).

The BubbleBoy.AutoParts.Deploy package definition is broken, it references two different ASP.NET Core packages.

Modify that project to update all dependencies to a compatible version, and release a new version.

I would suggest uninstall the conflicting packages completely. Also, if you have other projects in your solution which are referenced in your broken project or that your proj refereces, and that are using these conflicting libraries, uninstall from these as well.

Once the only error you see in your solution is about the missing package you uninstalled, go and install the version you need.

This kind of issues comes up when you have multiple projects referenced together which are using packages not compatible with one another.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM