.NET Core SDK on Mac

Dani_S 4,501 Reputation points
2024-05-27T10:27:12.52+00:00

Hi,

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?

Developer technologies | .NET | Other
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2024-05-27T16:56:42.62+00:00

    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.