.NET Core installation guide

Select your environment

Select your Linux distro

Select your environment

Install for Windows - Visual Studio 2015

  1. 1

    Download Visual Studio 2015

    Make sure you have Visual Studio 2015 Update 3 installed.

    Download Visual Studio 2015 with Update 3

    Or just download Visual Studio 2015 Update 3 if you already have Visual Studio 2015 installed.

  2. 2

    Install the .NET Core tools preview for Visual Studio

    .NET Core tools add support for .NET Core projects in Visual Studio 2015.

    Download .NET Core 1.0.1 tools Preview 2
  3. 3

    Create a new .NET Core project

    Click on File / New project and select the project template C# / .NET Core / Console application (.NET Core).

  4. 4

    Add some code

    Write some code in your Main method.

  5. 5

    Run your application

    Click on the menu item Debug / Start debugging to launch and debug your new .NET Core application from Visual Studio.

  6. 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.

Install for Windows - Visual Studio 2017

  1. 1

    Download Visual Studio 2017 RC

    An experimental release of .NET Core tools for Visual Studio is included in Visual Studio 2017 RC.

    Download Visual Studio 2017 RC
  2. 2

    Install the .NET Core tools preview workload

    Make sure you installed the workload ".NET Core and Docker (Preview)". You can check and install workloads by launching the Visual Studio Installer.

  3. 3

    Create a new .NET Core project

    Click on File / New project and select the project template C# / .NET Core / .NET Core Console application.

  4. 4

    Add some code

    Write some code in your Main method.

  5. 5

    Run your application

    Click on the menu item Debug / Start debugging to launch and debug your new .NET Core application from Visual Studio.

  6. 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.

Install for Windows - Command Line

  1. 1

    Install .NET Core SDK

    To start creating .NET Core apps you just need to download the .NET Core SDK for Windows.

    Download .NET Core 1.1 SDK

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

    Video: Installing .NET Core and Visual Studio Code in Windows

  2. 2

    Initialize some code

    Let's initialize a sample Hello World application!

    1. mkdir hwapp
    2. cd hwapp
    3. dotnet new
  3. 3

    Run the app

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

    1. dotnet restore
    2. dotnet run
  4. 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.

  5. Want some tools?

    Visual Studio Code complements your command line experience with a lightweight code editor that runs on Windows, Mac and Linux.

    Download Visual Studio Code

Install for Red Hat Enterprise Linux 7 Server

  1. 1

    Enable the .NET Core channel for Red Hat Enterprise Linux 7 Server

    In order to install .NET Core from Red Hat on RHEL Server, you first need to enable the .NET Core channel which is available under your RHEL 7 Server subscription. You also need to ensure that your system supports enabling software collections via the scl tool.

    1. subscription-manager repos --enable=rhel-7-server-dotnet-rpms
    2. yum install scl-utils

    For help on registering your machine to get access to the channel see the Chapter 1 of the .NET Core Getting Started Guide at Red Hat.

  2. 2

    Install and enable the .NET Core SDK

    Now you can install .NET Core 1.0 and then enable the .NET Core software collection.

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

    For additional help and guidance on installing and enabling .NET Core on RHEL Server, see the .NET Core Getting Started Guide at Red Hat.

    1. yum install rh-dotnetcore11
    2. scl enable rh-dotnetcore11 bash
  3. 3

    Initialize some code

    Let's initialize a sample Hello World application!

    1. mkdir hwapp
    2. cd hwapp
    3. dotnet new
  4. 4

    Run the app

    The first command will restore the packages specified in the project.json 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?

    Visual Studio Code runs on Linux and has full support for .NET Core.

    Download Visual Studio Code

Install for CentOS 7.1 & Oracle Linux 7.1

  1. 1

    Install .NET Core SDK

    Before you start, please remove any previous versions of .NET Core from your system.

    In order to install .NET Core 1.1 on CentOS or Oracle Linux, first you need to get the prerequisites and then you download the .NET Core SDK binaries, extract them onto your system and put dotnet onto your PATH.

    For other releases you can check the Linux downloads section.

    1. sudo yum install libunwind libicu
    2. curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=835019
    3. sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
    4. sudo ln -s /opt/dotnet/dotnet /usr/local/bin
  2. 2

    Initialize some code

    Let's initialize a sample Hello World application!

    1. mkdir hwapp
    2. cd hwapp
    3. dotnet new
  3. 3

    Run the app

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

    1. dotnet restore
    2. dotnet run
  4. 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.

  5. Want some tools?

    Visual Studio Code runs on Linux and has full support for .NET Core.

    Download Visual Studio Code

Install for Debian 8

  1. 1

    Install .NET Core SDK

    Before you start, please remove any previous versions of .NET Core from your system.

    In order to install .NET Core 1.1 on Debian, first you need to get the prerequisites and then you download the .NET Core SDK binaries, extract them onto your system and put dotnet onto your PATH.

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

    1. sudo apt-get install curl libunwind8 gettext
    2. curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=835021
    3. sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
    4. sudo ln -s /opt/dotnet/dotnet /usr/local/bin
  2. 2

    Initialize some code

    Let's initialize a sample Hello World application!

    1. mkdir hwapp
    2. cd hwapp
    3. dotnet new
  3. 3

    Run the app

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

    1. dotnet restore
    2. dotnet run
  4. 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.

  5. Want some tools?

    Visual Studio Code runs on Linux and has full support for .NET Core.

    Download Visual Studio Code

Install for Fedora

  1. 1

    Download .NET Core SDK

    Before you start, please remove any previous versions of .NET Core from your system.

    In order to install .NET Core 1.1 on Fedora, first you need to get the prerequisites and then you download the .NET Core SDK binaries, extract them onto your system and put dotnet onto your PATH.

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

    Fedora 23

    1. sudo dnf install libunwind libicu
    2. curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=835023

    Fedora 24

    1. sudo dnf install libunwind libicu
    2. curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=835025
  2. 2

    Install the SDK and put it on the $PATH

    1. sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
    2. sudo ln -s /opt/dotnet/dotnet /usr/local/bin
  3. 3

    Initialize some code

    Let's initialize a sample Hello World application!

    1. mkdir hwapp
    2. cd hwapp
    3. dotnet new
  4. 4

    Run the app

    The first command will restore the packages specified in the project.json 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?

    Visual Studio Code runs on Linux and has full support for .NET Core.

    Download Visual Studio Code

Install for openSUSE

  1. 1

    Install .NET Core SDK

    Before you start, please remove any previous versions of .NET Core from your system.

    In order to install .NET Core 1.1 on openSUSE, first you need to get the prerequisites and then you download the .NET Core SDK binaries, extract them onto your system and put dotnet onto your PATH.

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

    openSUSE 13.2

    1. sudo zypper install libunwind libicu
    2. curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=835027

    openSUSE 42.1

    1. sudo zypper install libunwind libicu
    2. curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=835029
  2. 2

    Install the SDK and put it on the $PATH

    1. sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
    2. sudo ln -s /opt/dotnet/dotnet /usr/local/bin
  3. 3

    Initialize some code

    Let's initialize a sample Hello World application!

    1. mkdir hwapp
    2. cd hwapp
    3. dotnet new
  4. 4

    Run the app

    The first command will restore the packages specified in the project.json 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?

    Visual Studio Code runs on Linux and has full support for .NET Core.

    Download Visual Studio Code

Install for Ubuntu 14.04, 16.04, 16.10 & Linux Mint 17

  1. 1

    Add the dotnet apt-get feed

    In order to install .NET Core on Ubuntu or Linux Mint, you need to first set up the apt-get feed that hosts the package you need.

    Video: Installing .NET Core and Visual Studio Code in Ubuntu

    Ubuntu 14.04 / Linux Mint 17

    1. sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
    2. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
    3. sudo apt-get update

    Ubuntu 16.04

    1. sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
    2. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
    3. sudo apt-get update

    Ubuntu 16.10

    1. sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ yakkety main" > /etc/apt/sources.list.d/dotnetdev.list'
    2. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
    3. sudo apt-get update
  2. 2

    Install .NET Core SDK

    Before you start, please remove any previous versions of .NET Core from your system by using this script.

    To install .NET Core 1.1 on Ubuntu or Linux Mint, simply use apt-get.

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

    1. sudo apt-get install dotnet-dev-1.0.0-preview2.1-003177
  3. 3

    Initialize some code

    Let's initialize a sample Hello World application!

    1. mkdir hwapp
    2. cd hwapp
    3. dotnet new
  4. 4

    Run the app

    The first command will restore the packages specified in the project.json 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?

    Visual Studio Code runs on Linux and has full support for .NET Core.

    Download Visual Studio Code

Install for macOS 10.11 or higher

  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 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. mkdir hwapp
    2. cd hwapp
    3. dotnet new
  4. 4

    Run the app

    The first command will restore the packages specified in the project.json 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?

    Visual Studio Code runs on macOS and has full support for .NET Core. Install the C# extension to get the best experience.

    Visual Studio for Mac provides a full IDE to create mobile applications and also supports .NET Core backend development.

Install for Docker - Command line

  1. 1

    Install Docker

    Before you can try out the .NET Core Docker base images, you should install Docker.

    Refer to the macOS, Windows or Linux getting started instructions for Docker to learn more about installing Docker.

  2. 2

    Run the container using "dotnet" base image

    The following command will get you a running container with the toolchain, straight off of Microsoft's Docker Hub.

    1. docker run -it microsoft/dotnet:latest
  3. 3

    Initialize some code

    Let's initialize a sample Hello World application!

    1. mkdir hwapp
    2. cd hwapp
    3. dotnet new
  4. 4

    Run the app

    The first command will restore the packages specified in the project.json 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?

    Visual Studio Code provides a lightweight code editing experience which runs everywhere (including Mac and Linux).

    Download Visual Studio Code

    If you use Yeoman, then take a look at yo docker to help you create, run and debug your .NET Core project inside of a Docker container.

Install for Docker - Visual Studio 2017 RC

  1. 1

    Download Visual Studio 2017 RC

    .NET Core tools for Visual Studio are included in Visual Studio 2017 RC, which can be downloaded for free.

    Download Visual Studio 2017 RC
  2. 2

    Install the .NET Core tools preview workload

    Make sure you installed the workload ".NET Core and Docker (Preview)". You can check and install workloads by launching the Visual Studio Setup Manager.

  3. 3

    Create a new .NET Core project

    Click on File / New project and select the project template C# / .NET Core / .NET Core Console application.

  4. 4

    Add some code

    Write some code in your Main method.

  5. 5

    Run your application

    Click on the menu item Debug / Start debugging to launch and debug your new .NET Core application from Visual Studio.

  6. 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.