Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

need dotnet core 2.1 to show up in visual studio

Tags:

asp.net-core

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?

like image 203
Chris Westbrook Avatar asked Apr 12 '18 17:04

Chris Westbrook


People also ask

What version of Visual Studio do I need for .NET Core?

NET Core application. Here, we will use Visual Studio 2019. If you don't have Visual Studio on your development PC, then it is recommended to install the latest Visual Studio 2019. If you already have either Visual Studio 2017 or 2019, then you already have installed .

Is .NET Core 2.1 still supported?

NET Core 2.1 and . NET Core 3.1 are long-term support versions, which means they're supported for 3 years after release. This is explained in the . NET Core Support Policy.

Do I need to install .NET framework for Visual Studio?

Starting with Visual Studio 2022, Visual Studio no longer includes . NET Framework components for . NET Framework 4.0 - 4.5. 1 because these versions are no longer supported.


1 Answers

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
like image 56
Juha Palomäki Avatar answered Nov 07 '22 18:11

Juha Palomäki