Introduction to Worker Services in .NET Core 3.0

Nick Fane
6 min readJun 12, 2019

.NET Core 3 is on the horizon and with it comes a plethora of new features, one of which is a new project template for .NET Core Worker Services.

Before we begin, be aware that it’s been possible to create these services since .NET Core 2.1 using IHostedService, this release only adds the project template and minor refinements. However, since this appears to be a bit of a milestone in .NET Core and background workers, I thought I’d write up a few articles for those who haven’t yet worked with them and wanted to dive in.

About myself, I’ve been working with .NET for about six years now and through either luck or good fortune, have been able to build many production applications with .NET and ASP.NET Core since the initial stable release.

As much fun as it’s been, one of the most frustrating experiences has been creating background workers or windows services before .NET Core 2.1. In a previous company, we used the framework Topshelf (albeit as a means of running these workers as windows services), but they were building support for when .NET Core hit 2.0. Other frameworks such as Hangfire could have been used to reach our desired outcome, but with the continually changing landscape of .NET Core 1.x and Docker on the rise, we decided to go with regular old .NET Core Console applications running in containers.

--

--