Detected package downgrade warning (dotnet core, vs 2017)

后端 未结 19 1500
梦如初夏
梦如初夏 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:19

    In my case, this error was not related to .NET Core but to .NET Standard.

    I had two libraries A, and B. Library A depended on some nuget package X, and library B depended on A. Once I upgraded X to a new version, somehow it started depending on a new version of NETStandard.Library nuget package (from 2.0.2 to 2.0.3), which broke the build of B with the error Detected package downgrade: NETStandard.Library from 2.0.3 to 2.0.2. Reference the package directly from the project to select a different version.

    Once I added the NETStandard.Library nuget package as a dependency to B (obviously targetting the latest version 2.0.3), the error went away, even if a new warning appeared:

    /usr/local/share/dotnet/sdk/2.1.403/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.targets(5,5): Warning NETSDK1023: A PackageReference for 'NETStandard.Library' was included in your project. This package is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see https://aka.ms/sdkimplicitrefs (NETSDK1023) (GWallet.Frontend.XF)

提交回复
热议问题