Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2017 : Target framework drop down does not show .NET Core 2.1 option

I have already installed VS2017 Enterprise 15.6.4. Recently installed .NET Core 2.1.101 SDK from official site

I was expecting .NET Core 2.1 as one of the target framework available if I create console or asp.net core application. Can someone help me understanding what I am missing here.

As suggested in comments, I installed 15.7 preview 2. Still no luck and same issue.

enter image description here

like image 716
rahulaga_dev Avatar asked Apr 03 '18 12:04

rahulaga_dev


People also ask

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

Change TargetIn 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.

Can I use .NET core in Visual Studio 2017?

Visual Studio 2017 Support for . Among the workloads and project types, you can find support for . NET Framework, . NET Core, Mono, and . NET Native for Universal Windows Platform (UWP).


1 Answers

I have faced the same problem. I solved this by installing the right SDKs with Runtime for .NET Core 2.1.

Basically to run/create 2.1 projects from VS Preview, you need to install the "2.1.300" (not 2.1.4) .NET Core SDKs and Runtime. https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-preview1 (this includes required Runtime already)

The good explanation of this misleading with versions i found here https://github.com/dotnet/cli/issues/8309 (dasMulli commented on Feb 24).

like image 171
Deniss Kulakov Avatar answered Sep 26 '22 17:09

Deniss Kulakov