Visual Studio does not display .NET Core 2.2 in Target Framework dropdown

34,162

Solution 1

Your Visual Studio Version is not up to date. You need to update it.

Visual Studio 2017 15.9 uses .NET Core 2.1 SDK by default after the workload is installed.

To update Visual Studio to use .NET Core 2.2 SDK:

Install the .NET Core 2.2 SDK.

Reference

PS: You need to restart visual studio. After you the installation of .Net Core 2.2 SDK.

Solution 2

I was having the same issue after downloading the latest dotnet-SDK-2.2.202 (at the moment). Tried everything on this thread and nothing worked.

I also recently updated to the latest VStudio 2017 - 15.9.11

Then I downloaded and installed the previous dotnet-SDK-2.2.105 available and it fixed the issue.

Find it here: https://dotnet.microsoft.com/download/dotnet-core/2.2

Solution 3

.net core SDK 2.2.202 requires MS build 16 to work. So you would need to install Visual Studio 2019.

See 2.2.202-SDK not available in Visual Studio 2017 #2542

Solution 4

I had the same issue, and the Core 2.2 did not show up on the Visual Studio in the Target platforms dropdown. I did everything answered above and still had the same issue. Finally I ended up creating a new global json config using

dotnet new globaljson --sdk-version 2.2.101 --force

Restarting Visual Studio after the above step worked for me.

Share:
34,162
TheJack38
Author by

TheJack38

Updated on May 01, 2020

Comments

  • TheJack38
    TheJack38 about 4 years

    I just cloned into an already existing project for work, and have found that for some reason, Visual Studio refuses to show .NET Core 2.2 in the "Target Framework" dropdown menu in the Properties -> Application menu.

    I have installed .NET Core 2.2 (by clicking "install other frameworks" and downloading/running the 2.2 SDK file. I have originally installed the x64 version as that's what my boss uses, but I later also installed the x84 version to see if that worked. Neither works.), and confirmed that this is correctly installed. I did this by running the command "dotnet --info" in the shell, which outputs the following:

    .NET Core SDK (reflecting any global.json):
     Version:   2.2.101
     Commit:    236713b0b7
    
    Runtime Environment:
     OS Name:     Windows
     OS Version:  10.0.16299
     OS Platform: Windows
     RID:         win10-x64
     Base Path:   C:\Program Files\dotnet\sdk\2.2.101\
    
    Host (useful for support):
      Version: 2.2.0
      Commit:  1249f08fed
    
    .NET Core SDKs installed:
      1.1.11 [C:\Program Files\dotnet\sdk]
      2.2.101 [C:\Program Files\dotnet\sdk]
    
    .NET Core runtimes installed:
      Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
      Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
      Microsoft.NETCore.App 1.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      Microsoft.NETCore.App 1.1.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    

    Still, there are no .NET Core 2.2 in the Target Framework dropdown. There are only two options currently: .NETCoreApp 1.0 and .NETCoreApp 1.1

    I've got Visual Studio 2017, and as far as I can tell from the About page, version 15.0.0

  • TomTom
    TomTom over 5 years
    To be more exact,at the time of this writing, 15.9 is the current visual studio. 2.2 support was added some time back - but NOT in 15.0. Run the installer and it will SCREAM for you to install a big update.
  • TheJack38
    TheJack38 over 5 years
    This worked! I thought I had the latest stable version of Visual Studio, but apparantly assuming that was incorrect. After I updated to 15.9, all the SDKs showed correctly (even ones I didn't know were installed, such as 2.0 and 2.1)
  • CularBytes
    CularBytes about 5 years
    When I do this I am getting an error that "one or more projects in the solution were not loaded correctly". The output says (for the project that is targeting 2.2: : error : Project file is incomplete. Expected imports are missing.
  • PmanAce
    PmanAce about 5 years
    Did this the trick for me even though I have 2 later versions installed!
  • Thiru
    Thiru about 5 years
    This worked for me as well. It sounds like Visual studio 2017 can recognize .net core 2.2.105 but not 2.2.202 (at least in my case). Another thing I didn't try is that update my visual studio to 2018 from 2017.
  • Iofacture
    Iofacture about 5 years
    thanks - I was dealing with this exact problem today. Looks like .net core developers are all using 2019 and forgot to update 2017
  • Tim Reilly
    Tim Reilly about 5 years
    This worked for me... :(
  • Aday
    Aday about 5 years
    This is the correct answer for those who .NET Core 2.2 didn't show up in the drop-down on the latest VS 2017 (version 5.9)
  • Ronald Abellano
    Ronald Abellano almost 5 years
    This works for me too. Installed the latest version then installed the version before it.
  • Andrew
    Andrew almost 5 years
    Not true any more see dotnet.microsoft.com/download - there is a special download for VS 2017. I needed this even though I could see 2.2 sdk option in visual studio project dropdown. VS 15.9.12
  • Mauricio Gracia Gutierrez
    Mauricio Gracia Gutierrez almost 5 years
    Check the CORRECT answer below by Javier Alvarez
  • nithinmohantk
    nithinmohantk almost 5 years
    This may be correct for some cases, but what SDK version is on the global.json would be the right culprit, when you upgrade to newer versions of Visual Studio, it needs a specific supported version.
  • Roberto C Navarro
    Roberto C Navarro over 4 years
    It's ridiculous you have to do this but it works, thank you for sharing. I guess we all should move to using VS2019.
  • shivi
    shivi over 4 years
    Installing 2.2.105vdidnt help me at all .I am using VS 2017 15.9 .Any Idea folks?
  • Naxin
    Naxin over 4 years
    On the link provided, it actually states which version of Visual Studio 2017 these SDKs support. At the time of comment -> 2.2.207 (VS 16.0), 2.2.110 (VS 15.9)
  • Naxin
    Naxin over 4 years
    Seems you also need to select x86/x64 that matches the install of Visual Studio you have. I.e. I'm running x86 VS on my x64 machine, and needed x86 SDK.
  • Ryan
    Ryan over 3 years
    This was the issue for me! Thank you! Ref: docs.microsoft.com/en-us/dotnet/core/tools/…