0

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:

enter image description here

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,

Redplane
  • 2,621
  • 2
  • 25
  • 48
  • basically says it isn't installed... keep in mind net core 1.0.1 != net core 1.1. You are telling the application to use 1.0.1, do you have 1.1 installed and not realize it? If you are using community edition you could step up to 2017 but if there is company restricting get that is a different story – mvermef Apr 02 '17 at 00:26
  • As they mentioned, the sdk 1.0.1 contains 1.0 and 1.1 . Am I right ? (https://www.microsoft.com/net/download/core) – Redplane Apr 02 '17 at 04:29
  • no... "Version": "1.0.1" is not the same as "Version": "1.1.1" completely different, since you are forcing it to a specific version. If 1.0.1 isn't installed then you get that error. – mvermef Apr 02 '17 at 17:28
  • https://www.microsoft.com/net/download/core#/sdk – mvermef Apr 02 '17 at 17:40
  • I downloaded sdk on the site you sent. As they mentioned: '.NET Core SDK (contains .NET Core 1.0 and 1.1)' . I just only see 1.0.1 in sdk folder. Its very weird. – Redplane Apr 02 '17 at 18:01
  • function of rtm vs pre-release bits @ 1 point there were dnx vs dotnet, that was a mess... One thing could help is you remove the "version": from your global.json, then it defaults (at least it should). – mvermef Apr 02 '17 at 18:07
  • I was confused by them saying it includes .NET Core 1.0 & 1.1 as well. I'm guessing you already resolved this but added my solution for future visitors as an answer. – jeffbricco May 22 '17 at 21:54

1 Answers1

3

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" } }

jeffbricco
  • 135
  • 8