After format my computer I reinstalled Vs 2017 V 15.6.3 and install ASP.Net Core SDK from Microsoft 2.1.4
But when I create new asp core application VS failed with e
Delete all build generated bin and obj folders. This worked for me after renaming project and trying to reload solution. Not really sure about the real cause of incompatible loading.
I have solved this problem a couple of times lately by closing Visual Studio and running the following commands
There seems to be times, especially at the beginning of projects, when nuget gets out of whack (technical term).
After installing VS2019 I started to have the same error when opening existing .Net Core solutions in VS2017.
In Visual Studio Installer I've updated VS2017 to the latest version (15.9.11) and the problem disappeared.
Later after upgrading VS2019 to the latest release I started to have the same errors and had to upgrade VS2017 again.
I just had the same issue while installing the new preview version of VS 2019. I fixed it by uninstalling the latest update which in turn uninstalled the most recent downloaded version of core. Which I belive caused the missmatch.
Repairing last Core installation worked for me
Run dotnet restore on command line for the solution.
Tip. If you've uninstalled the latest .net core version let's say 2.1.403 and installed the previous one, ensure the 2.1.403 folder has been actually removed at the path
C:\Program Files\dotnet\sdk\
I had the issue due to there left an empty folder with 2.1.403