The current .NET SDK does not support targeting .NET Standard 2.0 error in Visual Studio 2017 update 15.3
It sounds like installing the VS2017 update for that specific version didn't also install the .NET Core 2.0 SDK. You can download that here.
To check which version of the SDK you've already got installed, run
dotnet --info
from the command line. Note that if there's a global.json
file in either your current working directory or any ancestor directory, that will override which version of the SDK is run. (That's useful if you want to enforce a particular version for a project, for example.)
Judging by comments, some versions of VS2017 updates do install the .NET Core SDK. I suspect it may vary somewhat over time.
while the above answers didn't solve my problem. I finally solved it by specifically going to this link https://www.microsoft.com/net/download/visual-studio-sdks and download the required sdk for Visual Studio. It was really confusing and i don't understand why but that solved my problem
For me the solution was to change the version in global.json
to reflect the installed one.
Like the others said the version can be found running dotnet --info
in cmd
This:
{
"projects": [ "src", "test" ],
"sdk": {
"version": "2.0.3"
}
}
Became:
{
"projects": [ "src", "test" ],
"sdk": {
"version": "2.1.4"
}
}
You can also create the global.json file by running
dotnet new globaljson --sdk-version 2.1.4
at root of project