have tried upgrading to the professional version of visual studio 2017 v 15.6.0 (Preview 7.0)
and installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net
https://www.microsoft.com/net/download/visual-studio-sdks
You can download the SDK from the above site
check the SDK which is in your machine Path C:\Program Files\dotnet\sdk
Change or check the target framework in visual studio,
Right click on Startup Application or project => Application => Target Framework.
You can change the framework and build the solution and restore nugget packages.