Microsoft.NETCore.App 2.0.3

Viewed 4283

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

5 Answers

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.

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.

in .csproj file you can add:

<ItemGroup>
     <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.7" />
</ItemGroup>

<ItemGroup>
    <DotNetCliToolReference 
    Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.1" />

Related