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

  • Learning ASP.NET Core 2.0
  • Jason De Oliveira Michel Bruchet
  • 140字
  • 2021-07-02 22:04:17

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:
主站蜘蛛池模板: 宜都市| 年辖:市辖区| 海丰县| 吉木萨尔县| 马公市| 焦作市| 岢岚县| 桃源县| 江门市| 闽侯县| 玉溪市| 鹤庆县| 错那县| 安达市| 岑巩县| 贺兰县| 溧阳市| 英德市| 荔波县| 会泽县| 富川| 淮南市| 莱芜市| 德庆县| 札达县| 三江| 长治市| 大方县| 南郑县| 罗甸县| 宁南县| 宾阳县| 张家界市| 通道| 水城县| 大冶市| 湖口县| 深泽县| 云阳县| 海盐县| 滦南县|