Reputation: 3151
I'm installing .Net Core 1.0.1 and the lastest preview tooling for Visualt Studio 2015 Update 3.
I've created a project with .Net Core Web API. When I start the solution, it threw me an error box:
I created global.json for solution like this:
{
"projects": [ "Administration" ],
"sdk": {
"version": "1.0.1"
}
}
After that, I used command:
dotnet restore
I received one another error message:
The imported project "C:\Program Files\dotnet\sdk\1.0.1\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
I got in the folder mentioned by the error message, but that path doesn't exist.
I wonder what is going on with my Visual Studio 2015 Community Update 3. Currently, I'm doing my company project, I cannot update my Visual Studio to 2017.
Can anyone help me please. I've spent my whole day searching for solutions but no luck.
Thank you,
Upvotes: 0
Views: 7355
Reputation: 134
The SDK versions and .Net Core versions are not the same. .net core SDK 1.0.1 is not .net core 1.0.1. The last SDK version that works with VS 2015 is Preview 2.
I resolved this error by uninstalling the SDK I had installed (in my case 1.0.4) and installing the latest SDK that works with VS 2015 which is 1.0.0-preview2-003131. You can find the Visual Studio 2015 tools on their downloads page.
A global.json that works for VS 2015 looks like this:
{
"projects": [],
"sdk": {
"version": "1.0.0-preview2-003131"
}
}
Upvotes: 3