Detected package downgrade warning (dotnet core, vs 2017)

后端 未结 19 1400
梦如初夏
梦如初夏 2021-02-01 11:53

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.

19条回答
  •  北海茫月
    2021-02-01 12:12

    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.

提交回复
热议问题