[教程]在Deepin 15.2 下安装 ASP.NET core 1.0记录
Tofloor
poster avatar
不避风云
deepin
2016-08-31 18:53
Author
原文网址:http://my.oschina.net/bubifengyun/blog/738634 如有变动,以原文为正。


参考网页:
  1. sudo mkdir -p /opt/dotnet
  2. sudo tar zxf /path/to/dotnet.dev.debian.tar.gz -C /opt/dotnet
  3. sudo ln -s /opt/dotnet/dotnet /usr/local/bin
Copy the Code

解释:
  • 其中 /path/to/dotnet.dev.debian.tar.gz 是下载存放路径。
  • 第一行是解压缩。
  • 第二行建立超链接。2、安装依赖这个是使用如下命令遇到的问题,百度出来的,
  1. dotnet --version
Copy the Code

遇到问题了,说是需要如下依赖
  1. sudo apt-get install curl libunwind8 gettext libicu52
Copy the Code

3、简单例子
  1.     cd
  2.    
  3. mkdir www
  4.    
  5. cd www
  6.    
  7. mkdir test
  8.    
  9. cd test
  10.    
  11. dotnet new
Copy the Code

新建并初始化,
  1.     dotnet restore
  2.    
  3. dotnet run
Copy the Code

在此过程中出现了问题,也即Segmentation fault,经咨询 找到了答案。现在处于可以执行的状态,终端显示如下的结果
Project test (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missingCompiling test for .NETCoreApp,Version=v1.0Compilation succeeded.    0 Warning(s)    0 Error(s)Time elapsed 00:00:01.8522001Hello World!

类似内容,证明 .NET core 在Deepin下安装成功了。
4、安装 Yeoman, Bower, Grunt, Gulp, ASP.NET core 等的生成器本小点内容主要参考该书.
  1. sudo npm install -g yo bower grunt-cli gulp

  2. sudo npm install -g generator-aspnet
Copy the Code

解释
  • 假设你已经成功安装了 npm,如需请百度怎么安装。
5、另外一个简单例子
  1.     cd ~/www
  2.    
  3. yo aspnet
Copy the Code

解释
  • 按照输出提示,新建一个 WebLM 的网站,显示内容如下。
yo aspnet? ==========================================================================We're constantly looking for ways to make yo better! May we anonymously report usage statistics to improve the tool over time? More info: https://github.com/yeoman/insight & http://yeoman.io========================================================================== Yes     _-----_     ╭──────────────────────────╮    |       |    │      Welcome to the      │    |--(o)--|    │  marvellous ASP.NET Core │   `---------´   │        generator!        │    ( _´U`_ )    ╰──────────────────────────╯    /___A___\   /     |  ~  |        __'.___.'__    ´   `  |° ´ Y ` ? What type of application do you want to create? Web Application? Which UI framework would you like to use? Bootstrap (3.3.6)? What's the name of your ASP.NET application? WebLW解释
  • 接下来就是一大堆安装提示信息了,并有如下内容
Your project is now created, you can use the following commands to get going    cd "WebLW"    dotnet restore    dotnet build (optional, build will also happen when it's run)    dotnet ef database update (to create the SQLite database for the project)    dotnet run解释
  • 如果提示 bower ECMDERR 之类的信息,可能需要自行安装一些插件比如
  1.     cd ~/www/WebLW
  2.    
  3. bower install
Copy the Code

如果没有报错,继续使用上面提示的内容
  1.     cd ~/www/WebLW
  2.    
  3. dotnet restore
  4.    
  5. dotnet build
  6.    
  7. dotnet ef database update
  8.    
  9. dotnet run
Copy the Code

根据提示进入  http://localhost:5000/ 应该可以看到如下的界面了。

6、安装 vscode 及其插件这个比较傻瓜了,直接使用命令即可
  1. sudo apt-get install vscode -y
Copy the Code

其他插件安装可以自行百度。

最后吐槽一下,其他网址博客都开始支持 markdown了,为啥咱们 deepin 这么倔强呢,给用 Linux 一个更多选择不好吗?这个文本编辑器太烂了。



Reply Favorite View the author
All Replies
avatar
.Andy
deepin
2016-08-31 20:43
#1
感谢分享 因格式问题 去看看原文了
Reply View the author
avatar
左心房的痛
deepin
2016-08-31 22:20
#2
标记一下,以后需要来取
Reply View the author
avatar
myTTYY
deepin
2016-09-01 00:23
#3
大赞,也标记一下
Reply View the author
avatar
huoshan12345
deepin
2016-10-23 10:13
#4
简单的说,就是下载libcurl3_7.38.0-4+deb8u3_amd64.deb
然后执行sudo dpkg -i libcurl3_7.38.0-4+deb8u3_amd64.deb
然后就ok了,经测试没问题
Reply View the author