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 error
"Project file is incomplete. Expected imports are missing"
Please, can anyone help?
Repairing last Core installation worked for me
This happened to me when I uninstalled a VS2015 instance of Visual Studio I had running side by side with VS2017.
I had to go out and reinstall the .Net Core sdk/runtime with the x86 version. I had already manually done the x64 versions of these but didn't think about visual studio running in 32bit.
These are the files:
dotnet-sdk-x.x.x-win-x86.exe
DotNetCore.x.x.x-WindowsHosting.exe
I have resolved it by updating visual studio to 2017 version.
The actual problem was that .net core version was later than Visual Studio.
Go to Help> Check for update, update Visual Studio.
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.
The only thing that worked for me was to upgrade Visual studio:
Just need to cross check your project creation .net core library version with updated one.When you update core library it won't get updated into .csproj, either you need to update it manually or need to remove latest/updated core sdk file.
To check .net core version --fire command on cmd :- dotnet --version
Then check with installed library in Program and Features --Removing of latest library resolve the problem without change of single line