I was having the same issue after downloading the latest dotnet-SDK-2.2.202 (at the moment). Tried everything on this thread and nothing worked.
I also recently updated to the latest VStudio 2017 - 15.9.11
Then I downloaded and installed the previous dotnet-SDK-2.2.105 available and it fixed the issue.
Find it here: https://dotnet.microsoft.com/download/dotnet-core/2.2