一、环境准备
VMware
CentOS 7.1
国内下载镜像地址:
http://mirrors.aliyun.com/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1503.iso
http://mirrors.aliyun.com/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1503-01.iso
二、dotnet 安装
在centos7.1环境下直接参考微软官方说明(centos6就比较麻烦了,我尝试了下需要安装很多基础组建,就没再纠结此问题,果断换系统)
- sudo yum install libunwind libicu
- curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?linkid=848821
- sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
- sudo ln -s /opt/dotnet/dotnet /usr/local/bin
三、demo
dotnet new console -o hwapp #官网下载hwapp
cd hwapp #编辑以下hello world改为hello netcore
dotnet restore
dotnet run # run && output
四、关于netcore命令的说明
fyi.
时间: 2024-11-05 23:38:29