7
votes

When I try to upgrade ASP.NET Core in Nuget package manager, I get the following error:

Severity Code Description Project File Line Suppression State Error Package Microsoft.AspNetCore.All 2.1.0-preview2-final is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.All 2.1.0-preview2-final supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1) 0

I have installed the sdk multiple times, so I'm confused because when I go to target it only has up to dotnet core 2.0 as an option. I installed visual studio preview but that hasn't helped either. Any suggestions?

1

1 Answers

3
votes

For .NET Core 2.1 you need (currently) version 2.1.300-rc1 of the sdk. The version numbers of the SDK and .NET Core are not in sync, older 2.1 versions of the SDK are not enough.

This version can be downloaded from here: https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-rc1

You can check the version on command line with donet --version command. dotnet --info will also list all the installed runtimes and SDKs.

   > dotnet --version
   2.1.300-rc1-008673