Detected package downgrade warning (dotnet core, v

2019-03-11 14:29发布

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.

Thanks in advance!

14条回答
祖国的老花朵
2楼-- · 2019-03-11 15:33

Try removing:

<IsPackable>false</IsPackable>

from your project file - this is what worked for me!

If you are still left with NU1605 Error code you can ignore it by adding the following to your project file:

<PropertyGroup>
    <NoWarn>NU1605</NoWarn>
</PropertyGroup>
查看更多
聊天终结者
3楼-- · 2019-03-11 15:33

Try using NuGet

I was getting:

error NU1605: Detected package downgrade: System.Net.NameResolution from 4.3.0 to 4.0.0. Reference the packagedirectly from the project to select a different version.

So I referenced the package directory by running (in the project folder):

dotnet add package System.Net.NameResolution

See NuGet Errors - NU1605

Issue:

A dependency package specified a version constraint on a higher version of a package than restore ultimately resolved. That is, because of the "nearest wins" rule when resolving packages, a nearer package in the graph may have overridden a distant package.

Solution:

Add a direct reference to the project for the higher version of the package that you want to use.

查看更多
登录 后发表回答