Detected package downgrade warning (dotnet core, vs 2017)

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

    If you're getting this error for Razor in a netcoreapp3.1, you just need to change the project SDK from Microsoft.NET.Sdk.Razor to Microsoft.NET.Sdk.

    0 讨论(0)
  • 2021-02-01 12:21

    so, try to uninstall the package entirely and install it again. make sure you do this for all the solution projects reference it. then just clean and rebuild. this worked for me.

    0 讨论(0)
  • 2021-02-01 12:22

    I solved this issue thanks to this answer. Basically, just add the following line inside the <PropertyGroup> tags in your .csproj file:

    <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
    
    0 讨论(0)
  • 2021-02-01 12:24

    As per answer above the working solution is to remove the following line from your csproj file.

    Web App project:

    <RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
    

    Lib project:

    <NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
    
    0 讨论(0)
  • 2021-02-01 12:24

    I was able to get rid of these warnings in my project by removing the <NetStandardImplicitPackageVersion> element from the csproj file.

    There's some information in this article about implicit metapackages, which seems to be the root cause of this problem.

    You might also need to update some dependencies. For example, I had to upgrade BenchmarkDotNet from 0.10.1 to 0.10.3 to get rid of a few warnings like the ones you're seeing.

    0 讨论(0)
  • 2021-02-01 12:27

    Manually removing the nuget packages dependencies from the project and Install-Package for each of them fixed the problem in my case.

    0 讨论(0)
提交回复
热议问题