Building cross-platform web applications using ASP.NET Core

Now, let's make a simple ASP.NET Core web application.

Creating the simplest ASP.NET Core web application

You will enter some commands in the Terminal prompt to:

  • Create a new directory named HelloWeb and move into it
  • Create two files named startup.cs and project.json
  • Start Visual Studio Code so that we can edit the files in an IDE

Here are the commands to enter:

cd ~
mkdir HelloWeb
cd HelloWeb
touch startup.cs
touch project.json
code .

In Visual Studio Code, click on the startup.cs file on the left-hand side and then enter these statements:

using Microsoft.AspNet.Builder; using Microsoft.Extensions.Logging; namespace HelloWeb { public class Startup { public void Configure(IApplicationBuilder ...

Get C# 6 and .NET Core 1.0: Modern Cross-Platform Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.