1

I am breaking my head over this for a while now:

I have tried installing both professional and community version of visual studio 2017 v 15.5.2

and installed .net core Runtime 2.0.3 and .net core SDK 2.1.2.

When I open a new web application I get an error saying

"the sdk 'microsoft.net.sdk.web' specified could not be found"

When I try to build an existing project I get an error

"the current .NET SDK does not support targeting .NET Core 2.0. Either target .NET Core 1.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.0."

I don't see ".net core 2.0" in my target framework

I don't have global.json file in my computer

When I try dotnet --info, I get this

.NET Command Line Tools (2.1.2)

Product Information:

Version: 2.1.2

Commit SHA-1 hash: 5695315371

Runtime Environment:

OS Name: Windows

OS Version: 10.0.10586

OS Platform: Windows

RID: win10-x64

Base Path: C:\Program Files\dotnet\sdk\2.1.2\

Microsoft .NET Core Shared Framework Host

Version : 2.0.3

Build : a9190d4a75f4a982ae4b4fa8d1a24526566c69df

Some one please help

4

1 Answer 1

3

Fixed it by adding a MSBuildSdksPath userVariable.

Add an Enviroment variable named MSBuildSdksPath.

It's value should point to a Dotnet SDK folder. Eg:

C:\Program Files\dotnet\sdk\2.2.102\Sdks
1
  • I had similar issue when opening a solution in VS2017, which I had been developing in VS2019. In VS2017 I could not see or select Standard 2.0. I reopened the solution in VS2019 and it was broken there too! ....Adding the variable fixed it. Jan 13, 2019 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.