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

一笑奈何 提交于 2019-12-02 22:03:44
user6352951
  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.

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.

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.

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.

This is a rolling issue, not sure why VS updates dont offer the option to check install.

The issue is know by MS now, like @orad mentioned above once the previous versions have been uninstalled

Then install this based on the correct release version and target platform

Check for dotnet --list-sdks.In my case there were none. Installing the .NET Core sdk worked for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!