03 – .NET Core Console Application – HostBuilder

Slide 01
The Host Builder basically returns a new instance of the HostBuilder Class with pre-configured defaults.

What are these pre-configured defaults?

• Sets the Content Root Path
• Loads any Environment Variables with an _DOTNET prefix
• Loads configuration settings from appsetting.json files
• Loads User Secrets for Connection String that contain passwords or other sensitive information
• Load application specific Environment Variables

These next 2 are what makes the life of every developer easy:
• Configure ILoggerFactory
• Configures a Dependency Injection Container

Slide 02
I took a look at the Microsoft Documentation to see if this was specific to hosting websites. I didn’t find anything the limits the use of the Host Builder.

In fact, as I browsed the internet many other developers were taking advantage of the Host Builder to automatically configure some of the features in their Console Application.

In the next video we’ll go thru and begin creating a Console Application that will utilize all the features that a web application gets out-of-the-box.

I’ll see you there!