Home  >  Article  >  Backend Development  >  Tutorial on setting up .net core development environment under Linux

Tutorial on setting up .net core development environment under Linux

巴扎黑
巴扎黑Original
2017-08-14 13:30:082800browse

This article mainly introduces you to the steps of deploying the .net core environment under Linux. The article gives a detailed introduction. I believe it has certain reference value for everyone's study or work. Friends who need it can join us below. Let's see.

Note: The environment for installing .net core on Linux requires a 64-bit system

Installation and deployment are as follows:

1. Add the dotnet source to apt-get

Ubuntu 14.04 / Linux Mint 17


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

Ubuntu 16.04


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

Ubuntu 16.10


##

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

2. Installation. NET Core SDK

The address of the latest version of the SDK is as follows:

Official address: https://www.microsoft.com/net/download/linux

Local download: http://www.jb51.net/softs/472366.html


sudo apt-get install dotnet-dev-1.0.1

3. Generate sample code

After installing the SDK, generate a sample code and check whether the installation is successful


dotnet new console -o hwapp
cd hwapp

4. Execute the sample code to check the result


dotnet restore
dotnet run

If you see the familiar "Hello world" after execution, it means that your installation is successful.

The above are the installation steps. Deployment and operation will be introduced in subsequent blogs.

The above is the detailed content of Tutorial on setting up .net core development environment under Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn