How it works...

dotnet.exe runs the application from the main entry point (public static Main() method in the Program.cs file).

First, it creates a new web host by calling the WebHost.CreateDefaultBuilder() and the Build() methods.

The CreateDefaultBuilder() method applies some default parameters and method calls, such as; using Kestrel as a web server, loading IConfiguration from different locations, enabling IIS Integration, configuring log output to console, and so on.

The CreateDefaultBuilder() method includes the UseKestrel() method within itself. The UseKestrel() method is an ExtensionMethod provided by the Microsoft.AspNetCore.Server.Kestrel.dll assembly.

We can see the only NuGet dependency of the project is Microsoft.AspNetCore.All ...

Get ASP.NET Core MVC 2.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.