The .NET Core SDK is not installed or cannot be found under the path
Asked Answered
A

7

31

When compiling .Net Core RC2 project under VS 2015 I am receiving following error

GETSDKTOOLINGINFO : error : The .NET Core SDK is not installed or cannot be found under the path C:\Program Files\dotnet\bin. These components are required to build and run this project.

Files do exist under that directory.

Also when I input dotnet into command line I do see it's prining proper version number and stuff.(.NET Command Line Tools (1.0.0-beta-001598)

Any idea how to resolve the issue?

Animadversion answered 17/5, 2016 at 14:18 Comment(4)
Have you read the fineprint ;). You should uninstall previous dotnet sdks before using RC2 ;). The RC2 version of the CLI is not 1.0.0-beta-001598 but 1.0.0-preview1-002702. Can you uninstall the old SDK and re-install the .NET Core RC2 SDK? That should help.Meltwater
@Meltwater just uninstalling old cli fixed the issue in Visual Studio. ThanksAnimadversion
I'm experiencing this error. I've uninstalled/reinstalled twice already, and C:\Program Files\dotnet\bin shows all the necessary files. Does anyone have any further advice?Dampier
I second that, tries uninstalling and adding but still the issue remains. On a side note; if I create a new app using dotnet new I can build it from cmd line but not from VS.Lingwood
C
32
  1. Remove all older versions of core
  2. Unistall Microsoft .NET CLI for Windows from control panel if it exists. This helped me.

After you install RC2, Make sure your control panel shows ONLY these for .Net Core

  • Microsoft .Net Core 1.0.0 RC2 - VS 2015 Tooling Preview 1 (1.0.20513.14)
  • Microsoft .Net Core 1.0.0 RC2 - SDK Preview 1 (x64) to be version 1.0.0.2702

Hope this helps.

Cellulous answered 18/5, 2016 at 19:52 Comment(3)
#2 fixed my issueTwinned
In newer versions it could give the same problem and be resolved with the solution of @user6352951. Do not forget to uninstall Microsoft .NET CLI because that was for me the showstopper.Varitype
In my case a reboot was necessary to get rid of that errorWholesome
S
6

If you install VS 2015 and VS 2017 side by side you may end up with a situation where you have: .NET Core 2015 x86 .NET Core 2017 x64 (Take a look in Control Panel > Programs and Features)

When you try to open a VS project/solution targeting .NET Core you get the error message described in this posting.

If you search on this error you may get taken to this page: https://github.com/aspnet/Tooling/blob/master/known-issues-vs2015.md#missing-sdk

But the solutions described there don't work (such as editing your PATH to exclude the x64 version.)

HOWEVER .. from that page, download the x86 version of .NET x86 ".NET Core 1.0.1 SDK 1.0.0-preview2-003131 download links"

CLOSE any open sessions of VS. Then uninstall .NET Core 2017 x64 and then install .NET Core x86 version you just downloaded.

Your Control Panel > Programs and Features should now look like this:

Control Panel - After

What this effectively does is that now all your .NET Core is x86 rather than a mix of x86 and x64.

Reboot not required.

Sikorski answered 13/1, 2017 at 17:2 Comment(0)
A
4

Repair Microsoft .Net Core 1.0.0 RC2

In case the previous answer doesn't help you because the right version of dotnet core (SDK & Tools) is already the only one installed (I was in that case):

Repair both and that should fix your problem.

Acanthoid answered 10/6, 2016 at 19:11 Comment(0)
V
2

For anyone getting similar messages, here is the official Issue page in the CLI repo.

Of the mentioned workarounds, one is to remove the 'DotNet CLI' entries from the installed programs.

Votyak answered 12/7, 2016 at 8:25 Comment(0)
F
2

New update: 2021 Jan Update VS Code/ VS 2019/CLI:

Get/Download LATEST CORE version

here

  1. A) first check what you have --> run dotnet --info for runtime & dotnet --list-sdks for SDK, from the command line, then B) check which ones can be un/re-installed dotnet-core-uninstall list download MS tool from here IT WILL CLEAN uninstall correctly,

enter image description here


  1. Now you can re/install .Net Core make sure you close your VS Code / VS Studio, and then do your un-install/install
  2. (Windows Skip) for Mac only add your /usr/local/share/dotnet to PATH in your ~/.bash_profile
  3. the install from here on Microsoft

  1. To Fix Path for CLI commands, run these below it will add it to your path:

set DOTNET_ROOT=%USERPROFILE%\dotnet
set PATH=%USERPROFILE%\dotnet;%PATH%
set DOTNET_MULTILEVEL_LOOKUP=0
Fixation answered 23/11, 2016 at 23:35 Comment(0)
R
1

In terminal, run: dotnet --list-sdks

In my case there were none. Installing the .NET Core sdk worked for me.

Realgar answered 30/8, 2019 at 6:44 Comment(0)
L
1

If above answers not works

Try this

  1. If you installing 64 bit SDK's, Do uninstall x86 bit SDK's from the control penal
  2. And Try in Visual Studio

It worked from me

Lunette answered 23/11, 2019 at 12:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.