-
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.
- sudo apt-get install curl libunwind8 gettext
- curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=835021
- sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
- sudo ln -s /opt/dotnet/dotnet /usr/local/bin
-
2
Initialize some code
Let's initialize a sample Hello World application!
- mkdir hwapp
- cd hwapp
- dotnet new
-
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:
- dotnet restore
- dotnet run
-
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.
转载于:https://my.oschina.net/u/2996336/blog/824475