答案1
.Net
CLI
在 Ubuntu 16.04 和 Ubuntu 17.04 上设置
注册微软信任签名:
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
为你的发行版注册 Microsoft 产品源:
Ubuntu 17.04:
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-zesty-prod zesty main" > /etc/apt/sources.list.d/dotnetdev.list'`
Ubuntu 16.04:
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
Ubuntu 14.04:
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
安装 .NET Core SDK:
sudo apt-get update sudo apt-get install dotnet-sdk-2.0.0
如何使用:
dotnet new console -o hwapp cd hwapp
运行应用程序:
dotnet run
如果一切顺利,您的CLI
设置就完成了。
来源: