mac安装.net core

https://www.microsoft.com/net/core#macos

Install for macOS 10.11 or higher (64 bit)

  1. 1

    Install pre-requisites

    In order to use .NET Core, you first need to install the latest version of OpenSSL. The easiest way to get this is from Homebrew.

    After installing brew, do the following:

    1. brew update
    2. brew install openssl
    3. mkdir -p /usr/local/lib
    4. ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
    5. ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/

    Video: Installing .NET Core and Visual Studio Code in a Mac

  2. 2

    Install .NET Core SDK

    The best way to install .NET Core 1.1 on macOS is to download the official installer.

    Download .NET Core SDK

    This installer will install the latest stable version of the tools and put them on your PATH so you can run dotnet from the Console.

    .NET Core 1.1 is the latest version. For long term support versions and additional downloads check the all downloads section.

    Note: if you have any problems with installation on macOS, please consult our known issues page.

  3. 3

    Initialize some code

    Let's initialize a sample Hello World application!

    1. dotnet new console -o hwapp
    2. cd hwapp
  4. 4

    Run the app

    The first command will restore the packages specified in the project file, and the second command will run the actual sample:

    1. dotnet restore
    2. dotnet run
  5.  

    And you're ready!

    You now have .NET core running on your machine!

    Visit the .NET Documentation to get access to additional tutorials, samples and the full .NET Core documentation.

  6.  

    Want some tools?

    Get an editor to help you be more productive with .NET Core.

原文地址:https://www.cnblogs.com/xqnq2007/p/7258676.html