Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2017 - Missing .net core > 2.1 as target framework

Solution found! Took awhile, installed ALL sdks, and ALL runtimes then reinstalled latest version I wanted!

Goal, Have netcore 2.1 or greater as a dropdown option in visual studio. I've looked at possible duplicates questions already!

Details

After the last update of visual studio 15.7 to 15.8.4 .net core 2.1 or greater has disappeared from the target framework list.

I looked at other solutions as seen below. They were not helpful as I installed every version under the sun. See below screens.

Checked below for solutions (I already looked for solutions here!): VS2017 : Target framework drop down does not show .NET Core 2.1 option

The current .NET SDK does not support targeting .NET Core 2.1. target .NET Core 2.0 or lower or use a vs of the .NET SDK that support NET Core 2.1

Referenced screens: enter image description here enter image description here enter image description here enter image description here

UPDATE1: Removed 2.2 preview (NOT SOLVED, 2.1 is still missing) enter image description here

like image 706
Ya Wang Avatar asked Sep 17 '18 15:09

Ya Wang


People also ask

Is .NET Core 2.1 still supported?

NET Core 2.1 is no longer supported and updates will no longer be provided. If your application uses NET Core 2.1, we strongly recommend you migrate your application to a supported version – . NET 3.1 or later. You can download these versions from the .

Does VS 2017 support .NET Core?

Visual Studio 2017 Support for .NET Framework, . NET Core, Mono, and . NET Native for Universal Windows Platform (UWP).

How do I change my target framework to .NET Core?

NET Core project in Visual Studio. In the Solution Explorer, right-click on the project and select Edit Project File. Under the Target framework, you'll see the framework version option (net5. 0) and the option to change it.


1 Answers

In general, when new preview version of .NET Core 2.X appears and you are getting the error like this:

The current .NET SDK does not support targeting .NET Core 2.X

Make sure that:

  1. You have downloaded installed SDK and runtime you need. Run command dotnet --info to see what you have installed on your machine at the moment.

  2. You have checked the Use previews of the .NET Core SDK option here:

-> Tools -> Options -> Projects and Solutions -> .NET Core

Sometimes you might need to restart your Visual Studio after checking the option.

Note: it's always better to have the most recent Visual Studio version installed on your development machine (sometimes you might need a preview version - note a Download Preview link).

like image 93
Dmitry Pavlov Avatar answered Sep 24 '22 07:09

Dmitry Pavlov