Creating your first ASP.NET Core 3 application in Linux

To create and run your first sample application using only the Terminal window in Linux, follow these steps:

  1. If you haven't installed the .NET Core 3 SDK yet, then download and install it from https://dotnet.microsoft.com/download/dotnet-core/3.0 for your Linux distribution. The following 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 called aspnetcoremvcsample:  mkdir ~/Documents/aspnetcoremvcsample.
  2. Move into the new folder, that is, cd ~/Documents/aspnetcoremvcsample.
  3. Create a new web application based on the ASP.NET Core 3 MVC web application template and called dotnet new mvc:

  1. Run the sample application by executing dotnet run:

  1. Open a browser and go to http://localhost:5000

In this section, we've seen our first application running on different operating systems and briefly explored the tools that are available within the Integrated Development Environment. We will look at C# Interactive in the next section. There are also other external tools that can help make development as painless as possible. One such tool is LINQPad, which we will introduce in the next section as well.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.63.41