博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CentOS7安装.NET Core运行环境
阅读量:4702 次
发布时间:2019-06-09

本文共 912 字,大约阅读时间需要 3 分钟。

安装.NET Core

 ->首先需要删除以前安装的版本

 -> 获取安装脚本

curl -sSL https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview1/scripts/obtain/dotnet-install.sh | bash /dev/stdin --version 1.0.0-preview1-002702 --install-dir ~/dotnet

注:在CentOS中要安装.net core环境需要libunwind和libicu库,所以要先安装好这两个运行库,否则会报错:

dotnet_install: Error: Unable to locate libunwind. Install libunwind to continue

dotnet_install: Error: Unable to locate libicu. Install libicu to continue

yum install libunwindyum install libicu

 

 -> 安装完.net core后我们需要配置一个快捷方式,也可以配置环境变量,否则CentOS不认识dotnet命令

sudo ln -s ~/dotnet/dotnet /usr/local/bin

到这里CentOS的.NET Core环境安装完毕!

 

测试运行环境

  -> 新建一个.Net项目

  

#创建项目文件夹mkdir myfirstdotnetcoreappcd myfirstdotnetcoreapp#创建项目dotnet new#编译dotnet restore#运行dotnet run

运行成功后打印:

Project myfirstdotnetapp (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.

Hello World!

转载于:https://www.cnblogs.com/learn-dotnet/p/5519871.html

你可能感兴趣的文章
jquery children()方法
查看>>
C 语言文件操作
查看>>
NOIP2018凉凉记
查看>>
模块循环导入问题
查看>>
黑马程序员15 java基础加强2(类加载器和代理)
查看>>
今夜,vs2017正式版发布,有啥特点呢?
查看>>
安装完node.js,在命令行输入npm -v无反应的解决办法
查看>>
LinearRegression
查看>>
交换排序
查看>>
laravel 常用知识总结
查看>>
CentOS7 安装 nginx
查看>>
小总结2
查看>>
生产html测试报告
查看>>
iOS App上架AppStore 会遇到的坑
查看>>
[WinXP] Chrome使用CSS样式强制使用微软雅黑字体出现口口的解决办法
查看>>
单例模式
查看>>
开发中 为什么要使用strong self
查看>>
word count
查看>>
SQL Server 2008教程和Microsoft® SQL Server® 2008 R2 SP2 - Express Edition下载
查看>>
Codeforces-727D-T-shirts Distribution(贪心)
查看>>