zoukankan      html  css  js  c++  java
  • Ubuntu 安装 CLI 并运行 ASP.NET Core 1.0

    Ubuntu 下载地址:http://www.ubuntu.org.cn/download/desktop

    注:目前 CLI 的安装命令只支持 Ubuntu 14.04,暂不支持 Ubuntu 14.10 版本。

    如果 Ubuntu 14.10 安装 CLI,会出现下面的错误:

    安装运行步骤:http://dotnet.github.io/getting-started/

    1. Add the new apt-get feed

    分别执行下面的三个命令:

    sudo sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
    
    sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
    
    sudo apt-get update
    

    2. Install .NET Core

    执行命令:

    sudo apt-get install dotnet=1.0.0.001598-1
    

    dotnet 命令:

    3. Install Git

    执行命令:

    sudo apt-get install git-core
    

    git 命令:

    4. Run the app

    克隆 cli-samples

    git clone https://github.com/aspnet/cli-samples
    

    转到 HelloMvc、HelloMvcApi、HelloWeb、HelloWebFull 目录下,执行命令(程序包还原,真不是一般慢啊,几个小时了还没好):

    dotnet restore
    

    运行程序:

    dotnet run
    
  • 相关阅读:
    FastAPI(5)- 查询参数 Query Parameters
    FastAPI(4)- 路径参数 Path Parameters
    FastAPI(3)- uvicorn.run()
    Python
    Python
    Python
    Python
    Python
    Python
    Python
  • 原文地址:https://www.cnblogs.com/xishuai/p/ubuntu-cli-aspnet-core.html
Copyright © 2011-2022 走看看