Now, let's make a simple ASP.NET Core web application.
You will enter some commands in the Terminal prompt to:
Create a new directory named
HelloWeb
and move into itCreate two files named
startup.cs
andproject.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 app, ILoggerFactory loggerFactory) { loggerFactory.AddConsole(); app.UseIISPlatformHandler(); app.UseStaticFiles(); app.UseWelcomePage(); } } }
Click on the project...