I updated an asp.net core 2 app with updated nuget packages. Boom, my web app nolonger compiles. I get the error shown below. I tried to go in and manually change the versions by editing the csproj, but I seemed to be causing more harm than good. Anyone have an idea how to resolve this?
Severity Code Description Project File Line Suppression State Error NU1605 Detected package downgrade: Microsoft.NETCore.App from 2.0.3 to 2.0.0. Reference the package directly from the project to select a different version. BWD.ASPNET.Core -> Microsoft.EntityFrameworkCore.Tools.DotNet 2.0.1 -> Microsoft.NETCore.App (>= 2.0.3) BWD.ASPNET.Core -> Microsoft.NETCore.App (>= 2.0.0) BWD.ASPNET.Core E:\BWDCore\BWD.ASPNET.Core\BWD.ASPNET.Core\BWD.ASPNET.Core.csproj 1
What did work was removing the core nuget packages and then only adding back the .net core metapackages. Thanks to my buddy Shawn Wildermuth (and everyone) for the suggestion. :-)
I can't take credit for the answer. I am just reposting it here for anyone that might be wondering and find this via google. I also got some other suggestions, but none of them worked.
As mentioned in the links above another options is to add
<NoWarn>NU1605</NoWarn>
To element PropertyGroup
Try to add this line in the section PropertyGroup of your *.csproj file:
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
Don't forget to clean the project up.
I hope it will help you.
I think Microsoft.EntityFrameworkCore.Tools.DotNet Version="2.0.1" has a dependency issue. It says it requires Microsoft.NETCore.App (>= 2.0.3).
We went back to Microsoft.EntityFrameworkCore.Tools.DotNet Version="2.0.0", and it all just worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With