Reputation: 5029
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:
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.
Just reinstalled VS, here's how that looked:
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
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.
Upvotes: 3
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.
Upvotes: 6
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