How to install .Net core SDK in Mac OS ?

 Hello Everyone,

As the official website not having full instructions,I am writing this article about installing .Net code SDK in Mac OS.

Step1: As usual, go to microsfot website https://dotnet.microsoft.com/download and choose what version of .Net SDK you want. Download and install it. 

As per the installation guide in the webpage, you have to execute in the terminal `dotnet` you will expect to output similar to this

PS az204_prep> dotnet


Usage: dotnet [options]
Usage: dotnet [path-to-application]
Options:
-h|--help Display help.
--info Display .NET Core information.
--list-sdks Display the installed SDKs.
--list-runtimes Display the installed runtimes.
path-to-application:
The path to an application .dll file to execute.
PS az204_prep>

But instead that you will get

zsh: command not found: dotnet

To resolve this error verify you can find dotnet binary in /usr/local/share/ location with ls.

✘  ~  ls /usr/local/share/dotnet/dotnet
/usr/local/share/dotnet/dotnet

Then simplay either add to your shell PATH with export command and source your shell file.

 
 
export PATH="$PATH:/usr/local/share/dotnet/dotnet"
 

Or create a soft link into /usr/loca/bin directory

 
  ~  ls /usr/local/share/dotnet/dotnet
/usr/local/share/dotnet/dotnet
 

Hope it helps you.

Thank you.


 

0 comments:

Post a Comment