注重:在Linux上装置.net core 的环境须要64位体系
装置布置以下:
1、把dotnet源新增至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、装置.NET Core SDK
当前最新版本的SDK的地点以下:
sudo apt-get install dotnet-dev-1.0.1
3、生成示例代码
装置SDK完成后,生成一个示例代码已检察是不是装置胜利
dotnet new console -o hwapp cd hwapp
4、实行示例代码检察效果
dotnet restore dotnet run
假如实行后,看到熟习的“Hello world” 就示意你装置胜利了。
以上就是装置步骤,布置及运转将在后续的博客中引见。
总结
以上就是Linux下搭建.net core环境要领步骤的细致内容,更多请关注ki4网别的相干文章!