- 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:
- 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
- Create a folder for your sample application,
mkdir ~/Documents/aspnetcoremvcsample. - Move into the created folder, cd ~/Documents/aspnetcoremvcsample.
- Create a new web application based on the ASP.NET Core 2.0 MVC web application template, dotnet new mvc:

- Run the sample application by executing dotnet run:

- Open a browser and go to http://localhost:5000:

推薦閱讀
- Apache ZooKeeper Essentials
- Python語言程序設計
- 碼上行動:零基礎學會Python編程(ChatGPT版)
- 微信小程序項目開發實戰
- 全棧自動化測試實戰:基于TestNG、HttpClient、Selenium和Appium
- 青少年學Python(第1冊)
- Building Machine Learning Systems with Python(Second Edition)
- 新一代SDN:VMware NSX 網絡原理與實踐
- 智能手機故障檢測與維修從入門到精通
- 數據科學中的實用統計學(第2版)
- Java EE 8 and Angular
- Mastering Unreal Engine 4.X
- Mastering Unity 2017 Game Development with C#(Second Edition)
- Python算法交易實戰
- 嵌入式網絡編程