Skip to content

Installing the .NET Core SDK on macOS

Installing .NET on macOS is necessary because it provides a cross-platform development framework that allows developers to build and run applications on macOS using the .NET technology stack.

Steps

  1. Firstly, we need to install the Homebrew Package Manager. Copy and paste the command given on the website into your terminal.

    Installing Homebrew

    You will need to enter in your password into the terminal to install Homebrew. Whilst you may type into the keyboard, no password characters will appear for security reasons.

  2. Now use brew from your terminal to to install the .NET Core SDK:

    Terminal window
    $ brew install dotnet-sdk --cask

    You will also need to link the dotnet command into /usr/local/bin:

    Terminal window
    $ ln -s /usr/local/share/dotnet/dotnet /usr/local/bin
  3. To test if the .NET Core was installed successfully, see if the dotnet command exists.

    $ dotnet

    If you’re seeing command not found, you may you can execute the following command to fix it:

    Terminal window
    $ ln -s /usr/local/share/dotnet/dotnet /usr/local/bin

    Known issues with dotnet install

    Should you have any other installation issues, review the .NET core release notes or raise an issue on GitHub.

  4. In Visual Studio Code you should install the following extensions:

    You can do this from the command line by executing:

    Terminal window
    code --install-extension ms-vscode.csharp
    code --install-extension k--kato.docomment
    code --install-extension vscode-icons

    You can also search for them by opening up the extensions panel. You can use the ⌘+x to open the panel. Then search for the name and click install:

    Installing VSCode C# Extensions