15

I created a .NET Standard Class library which seems to point to 1.6, but when I go to change it to v2.0, I don't see it in the list:

Visual Studio project properties pane, with target framework select open and missing versions of .NET Standard after v1.6

Also attached is the latest info from my machine and versions, I have installed both the .NET Core 2.2.1 x64 & x86 SDKs and I have the .NET Full Framework 4.7.2. I'm using VS 2017, v15.9.3.

Visual Studio installation modification pane

Just reinstalled VS, here's how that looked:

CMD and Visual Studio installer showing installed versions of dotnet and VS version

Reinstalling VS did not end up working, so I tried reinstalling Windows and then VS, which did the trick... Is there an easier, more consistent way to fix this?

zcoop98
  • 2,590
  • 1
  • 18
  • 31
Zoinky
  • 4,083
  • 11
  • 40
  • 78

3 Answers3

5

I just ran into this issue. Reinstalling the sdk and VS didn't help. The issue ended up being an incorrect order of paths in the System Path variable. As soon as I moved C:\Program Files\dotnet\ before C:\Program Files (x86)\dotnet\ VS was able to pickup the correct sdks.

System Path variable

Augusto Barreto
  • 3,637
  • 4
  • 29
  • 39
  • 1
    I know this is an old problem - but I just encountered it. I did the inverse of you and it worked. Probably worthy of note - the program that had issues binding into the SDK was a 32 bit install. – Amiga500 May 27 '21 at 10:11
  • This didn't work for us. VS 2022. – Richard Anthony Hein Sep 16 '22 at 14:44
  • In VS 2022, in my case, "C:\Program Files (x86)\dotnet\" was missing in System Path variable. After adding manually, it works! – MAQ678 May 31 '23 at 11:19
3

My team got into this issue. Though we installed all .Net Core SDK but VS2017 targer framework was showing up to .Net Standard 1.6. After searching a lot, we found all .Net Core SDK versions installed(latest till 2.2.10) are 64 bit except one 2.2.301 which is x86 version.

Command dotnet --info helped us to find the same. In dotnet --info output, Base path was pointing to C:\Program Files (x86)\dotnet\sdk\2.2.301\

SDK paths: C:\Program Files\dotnet\sdk

C:\Program Files (x86)\dotnet\sdk

Finally, we uninstalled the x86 version and then the Environment path reset and pointed to 64 bits SDKs as shown in below diagram. Now, targer framework is pointing to .Net Standard 2.0.enter image description here

A. Gopal Reddy
  • 370
  • 1
  • 3
  • 16
1

I had the very same problem, even went as far as reporting it to Microsoft. It only happens with a clean install, so people checking it on their long used and upgraded systems wouldn't be able to help.

But, after many desperate tries and giving up, I switched off the computer and fired it up next morning. And VS was working all right, with the 2.0 where it should be.

I know this isn't a proper, reliable and repeatable solution but maybe it'll spare the trouble of reinstalling everything for somebody... :-)

Gábor
  • 9,466
  • 3
  • 65
  • 79