官术网_书友最值得收藏!

Creating your first ASP.NET Core 2.0 application in Linux

To create and run your first sample application using only the Terminal window in Linux, you have to do the following steps:

  1. If the .NET Core 2.0 SDK is not yet installed, then download and install .NET Core Preview 2 from https://www.microsoft.com/net/core/preview for your Linux distribution. Here is an example of how to do that for Ubuntu:
      sudosh -c 'echo "deb [arch=amd64]
https://apt-mo.trafficmanager.net/repos/dotnet-release/
xenial main" > /etc/apt/sources.list.d/dotnetdev.list' sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80
--recv-keys 417A0893 sudo apt-get update sudo apt-get install dotnet-sdk-2.0.0-preview2-006497
  1. Create a folder for your sample application,
    mkdir ~/Documents/aspnetcoremvcsample.
  2. Move into the created folder, cd ~/Documents/aspnetcoremvcsample.
  3. Create a new web application based on the ASP.NET Core 2.0 MVC web application template, dotnet new mvc:
  1. Run the sample application by executing dotnet run:
  1. Open a browser and go to http://localhost:5000:
主站蜘蛛池模板: 九江市| 集贤县| 东明县| 巴彦淖尔市| 黄石市| 宜春市| 临高县| 麻江县| 盐源县| 齐河县| 肇源县| 萨迦县| 禹城市| 沾益县| 北碚区| 从化市| 稷山县| 华蓥市| 通化县| 双牌县| 布尔津县| 治县。| 崇文区| 龙川县| 普安县| 安吉县| 米林县| 房产| 东乌| 阿坝| 石家庄市| 鄱阳县| 德保县| 威信县| 六盘水市| 措勤县| 桐梓县| 荣昌县| 云梦县| 景德镇市| 东乡族自治县|