Project structure overview

This section gives you an overview of the worker template project provided out of the box by the .NET Core templating system. We will use this type of project to implement a health-check worker. First of all, let's start by creating a new project using the following CLI command:

dotnet new worker -n HealthCheckWorker

This command creates a new folder called HealthCheckWorker and it creates all of the files needed by a basic worker service project. Let's have a look at the files created by the template dotnet new worker command executed previously.

Secondly, we can run the tree CLI command (available both on macOS X and Windows), which shows the folder structure of the project previously created:

.├── Program.cs ...

Get Hands-On RESTful Web Services with ASP.NET Core 3 now with O’Reilly online learning.

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