Detected package downgrade warning (dotnet core, vs 2017)

Nik picture Nik · Mar 10, 2017 · Viewed 58.7k times · Source

I have just updated all my nuget packages for my solution (dotnet core 1.1 project).

I am now getting the following warnings and I don't really know what they mean.

NETStandard.Library downgrade warning


Update: I am still getting warnings mentioned above. My web projects warn about the Microsoft.NETCore.App package (see screenshot below) and my lib projects warn about NETStandard.Library (see screenshot above)

Microsoft.NETCore.App downgrade warning

When trying to update Microsoft.NETCore.App in the NuGet package manager, I am getting the following error:

NuGet upgrade error

Hope someone can help me get rid of those warnings and setup everything it is meant to be, so I can update all my packages.

Answer

Jimmy Shaw picture Jimmy Shaw · Sep 26, 2017

This situation occurred to me after opening an existing solution but instead of Warnings, they were Errors.

I opened the YourAwesomeApp.csproj file and went through the "Detected package downgrade" errors one-by-one and manually changed the version of that line item from the existing version to the specified version that was shown in the error itself.

For example, if the Error says downgrade detected "SqlServer 1.0.4 -> 1.0.3" then find the line for package SqlServer and edit the version from 1.0.3 to 1.0.4.

Those errors should disappear after building the project.

The downside to this that I only had 5 errors this time but what if another person's project contained say 50 such errors. Then that person's task of manually editing those lines would be very tedious and time-consuming.