Skip to content

dotnet command doesn't exist on macOS #3603

Open
@leecow

Description

@leecow

@grosch commented on Sat May 18 2019

Issue Title

dotnet command doesn't exist after installing SDK

General

I just went to https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install and downloaded the SDK. It installed without any errors. I then closed all terminals and opened a new one, but the dotnet command doesn't exist.

I'm on macOS Mojave 10.14.4


@CPoffWebster commented on Sat May 18 2019

I have the same issue. It seems to download fine on macOS High Sierra, but not on Mojave.


@grosch commented on Sat May 18 2019

Their installer is screwy. This will fix your issue:

sudo ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/

@CPoffWebster commented on Sat May 18 2019

Thank you this fixed the issue!


@karelz commented on Wed May 22 2019

@dagood any idea who could help fix this in our installers?


@leecow commented on Thu May 23 2019

The Mac installer does not create a symlink, it adds /usr/local/share/dotnet to PATH. We can discuss if changing the approach makes sense as well as try to figure out why PATH was not updated in this case.


@grosch commented on Thu May 23 2019

@leecow Updating the PATH is never the right thing to do. You have no idea how the system or the user's environment is configured. Every time you add to the path, for example, the shell has to re-find everything. The path should be set one and only one one time for performance reasons.

Regardless, you're making an assumption as well that I'm using Bash as my shell, for example. I hate bash, I'm using tcsh, and you're not updating that. The proper way to install local software is to install it into /usr/local/bin, or ask the end user where it should be installed. Don't try to have your software modify the path.


@leecow commented on Thu May 23 2019

Thanks for that feedback @grosch. We'll have a look at making the change. Moving this issue to core-setup.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions