.NETCoreApp 2.0 option missing from "Target framework" dropdown of project properties, after installing 2.0

13,959

Solution 1

You might need to update your visual studio Version 15.3.0 and install .NET Core 2.0 SDK - then you should be able to see all your options in Target Framework the drop-down.

If you have installed all the updates above, and you still don't see it, try the following.

Edit your *.csproj file and set your target framework to the proper value <TargetFramework>netcoreapp2.0</TargetFramework> like below.

Keep in mind that you have to update your NuGet packages afterward, by running Update-Package from your NuGet Package Manager Console

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
    <DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
  </PropertyGroup>

Solution 2

If manual adjustment didn't help check your project for global.json file, if it exists -> check SDK version. It was 1.0.4 in my case, replace with 2.0.0 -> close/re-open your solution, check available target frameworks. The answer is from this link

{
  "sdk": {
    "version": "1.0.4"
  }
}
Share:
13,959
voxoid
Author by

voxoid

Updated on June 27, 2022

Comments

  • voxoid
    voxoid almost 2 years

    I had a .NETCoreApp 1.1 Console App created in Visual Studio 2017 Community, and wish to upgrade it to 2.0.0 (so I can use Microsoft.AspNetCore.WebSockets 2.0.0). In project properties, I expand the "Target frameworks" dropdown, select "Install other frameworks...", download .NET Core 64-bit, complete the installer, restart visual studio, but the 2.0 framework is still not available from the dropdown; only 1.0 and 1.1.

    I also tried installing the 32-bit version, and then the main Core 2.0 SDK (64-bit). Still no option. I also tried manually editing the project file to point everything to 2.0, but then I get build errors, and the dropdown selection is blank and the 2.0 option still not there.

    What is the proper way to make 2.0 a target framework?