-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect version ranges shown for PackageReference: Version conflict detected #5463
Comments
I'm seeing this as well with In the below example, I would have expected
|
This also occurs with project.json configs.
Microsoft Visual Studio Community 2017 Installed Version: Community NuGet Package Manager 4.2.0 Edit: @DanRigby a possible workaround is to install the v25 Android.Support libraries yourself, forcing nuget to take those. I know it is still painful, but at least it works... |
This bug is really hard to workaround in most cases. I would think that any package that has a dependency of |
There shouldn't be a conflict if there's no upper bound. I believe there was a bug with printing out the upper bound in the error message that was recently fixed. Can you look at the project.assets.json in the obj folder |
Here's a quick example in Project A(
Xamarin.GooglePlayServices.Maps Package Manager Output:
project.assets.json:
Project B(
Xamarin.GooglePlayServices.Maps Package Manager Output:
TLDR; |
@emgarten @rrelyea @rohit21agrawal any ideas? Would seem to be good to get a fix in for 4.4. |
I think @davidfowl is correct here, these packages actually depend on exact versions, the error message incorrectly shows VS 15.3 added Reference the package directly from the project to resolve this issue. to the conflict message to help users fix the issue.
Some background on why packages.config and PackageReference resolvers behave differently: The PackageReference resolver fails fast when there is a conflict and allows users to fix the issue through nearest wins. https://docs.microsoft.com/en-us/nuget/consume-packages/dependency-resolution Packages.config on the other hand searches all possible versions to find a match and can find difficult solutions that PackageReference doesn't, but this is much slower and would not work well for PackageReference style projects which have far more dependencies including the transitive dependencies. |
Confirming still reproducible with Visual Studio for Mac
Being tracked over at reactiveui/ReactiveUI#1460 |
Same problem when installing into iOS projects -> reactiveui/ReactiveUI#1485
|
I believe the original issue here is fixed so I am closing this out, error messages now display the correct version range information. For anyone else getting resolution conflicts, these are caused by dependency constraints in packages. To resolve these reference the package you want to use top level. If you believe you are incorrectly getting errors that should not happen please open a new issue with a repro so that it can be investigated. @ghuntley this issue is specific to version conflicts with PackageReference projects. Your output shows a circular dependency with a packages.config project which is not related to this issue. |
We try out the new PackageReference today, but an error occured:
Version conflict detected for ProjectA.
Main (>= 1.0.0) -> ProjectB (>= 9.0.22) -> ProjectA (>= 9.0.22)
Main (>= 1.0.0) -> ProjectC (>= 6.1.50) -> ProjectD (>= 8.0.19) -> ProjectA (>= 8.0.19).
Steps:
Expectation:
ProjectC successfully installed and ProjectA is used in Version >= 9.0.22.
If we use the "old" packages.config, it work.
A possible workaround:
The text was updated successfully, but these errors were encountered: