Zoinky
Zoinky

Reputation: 5029

Missing .NET Standard 2.0 Framework with .NET Core SDK 2.2.1 & .NET Framework 4.7.2

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?

Upvotes: 16

Views: 9956

Answers (3)

A. Gopal Reddy
A. Gopal Reddy

Reputation: 380

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

Upvotes: 3

Augusto Barreto
Augusto Barreto

Reputation: 3695

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

Upvotes: 6

Gábor
Gábor

Reputation: 10274

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

Upvotes: 2

Related Questions