.NET Core SDK on Mac

Dani_S 3,126 Reputation points


I have Mac computer.

I install vs code.

I installed .NET Core SDK 8 and got this error in vs code.

The .NET Core SDK cannot be located: Error running dotnet --info: Error: Command failed: dotnet --info

/bin/sh: dotnet: command not found

/bin/sh: dotnet: command not found

. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path.

what to do?

Microsoft Technologies based on the .NET software framework.
3,548 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 59,546 Reputation points

    the error means that the dotnet executable is not in your path. just type

    % echo $path

    it see if its on the list. you don't specify how you installed the sdk (homebrew or the sdk installer), but the sdk uses /usr/local/share/dotnet. the sdk typically creates an entry in /etc/paths.d to define the addition to $path, but you can use your shell config. again you don't specify your shell, but it looks like the bash shell rather the current default, zsh.

    if set up correctly, from the command line you should be able to run

    % dotnet --info

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful