-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Build error NU1605 "Detected package downgrade" while adding a netstandart13 library #907
Comments
@ericstj can you give any guidance here? |
Firstly, It seems NuGet made a breaking change around downgrades warnings in the latest release see NuGet/Home#5594. @emgarten Secondly, Your workaround of directly referencing the higher versions is appropriate to undo the downgrade. Now finally, the missing dependency. If I examine the dependencies of the library you installed I see the following:
Just to be certain those weren't previously coming from packages, I ran the test both with the downgrade workaround and with So it would seem that Devart.Data.PostgreSql built against these two assemblies (via packages) but didn't include them in their nuspec as dependencies. Again for this one I'd file an issue on DevArt.PostgreSql. |
You can also work around this by clearing |
Sounds like this one is "resolved" in that there is a workaround and the issue is in an external project. Closing. |
@emgarten - How do we clear the ??? |
@KshitizGIT try |
I've also been getting errors like this since upgrading MathNet.Numerics.FSharp from 4.0.0-beta2 to 4.1.0:
The really bizarre thing was that my project referenced neither of the mentioned versions. It had
The fix was to add
to all F# projects in my solution. It works now, but how ON EARTH is the user supposed to know they need to add that?! 2 developers wasted at least 4 hours on this. |
@KevinRansom looks like the FSharp targets need something like @dsplaisted added to dotnet SDK around honoring the project over the implicit package. https://github.com/dotnet/sdk/blob/a0ba16704bb83054dc7cdda2fc0f7628a1c0935f/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Sdk.DefaultItems.targets#L192-L210. @loop-evgeny you may want to file this over in https://github.com/Microsoft/visualfsharp if you think there isn't an existing issue covering it. |
@KshitizGIT You can clear it by adding: |
The solution that I found for this problem is to find out the package and donwgrade its version for the version sugested during compilation. |
I've read all the workarounds provided in this issue and I have to say they looked quite cumbersome/ugly. IMHO the best solution/workaround to this frustrating problem (which in my case was not just a warning, it was also throwing a |
Given a project which targets netcoreapp2.0. And a package which targets netstandard13 - Devart.Data.PostgreSql (ado.net provider for Postgres).
Installing in VS
The package cannot be installed in VS2017.3. It silently fails.
Installing via cli
installs the package, but build fails (it's only a excerpt from full output):
Here's the dependencies of the package:
I managed to workaround the issue by adding the following package references into csproj:
After that the project builds and runs successfully. But only for netcoreapp2.0.
If I build and run it for net462:
it fails:
So for net462 I added:
After that it builds and runs on net462 too.
But I think it's too cumbersome. Also it requires manual csproj editing and does not work via VS Package Manager out of the box. So I believe it's not a normal situation.
P.S. I really have no idea where such an issue should be reported, so please feel free to move it to an appropriate repo.
The text was updated successfully, but these errors were encountered: