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

In case this helps someone else... After installing VS 15.9.2 my project that was working fine with 2.2 preview-3 stopped working. VS could not see the preview SDK. I could build the solution using dotnet.exe but not VS.

To solve this I created a global.json at the root folder of this solution pointing to the preview sdk. That allowed VS to see the preview version.

This is a change of behavior in VS between 15.8.x and 15.9.x.

To create the global.json you can navigate to the desired folder and type this:

dotnet new globaljson


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).