Creating our Windows Service

To create the Windows Service, let's start with a new .NET Core 3 console application:

You may wish to separate parts of this application into their own class libraries if you choose to extend this application. Clearly, the functionality that we're using is not restricted to a console application. If the functionality was in its own class, you could simply call it from a desktop application.

The next step is to install the Windows Compatibility NuGet package:

Install-Package Microsoft.Windows.Compatibility

This will allow us to create a Windows Service.

It's worth noting at this stage that, despite being .NET ...

Get C# 8 and .NET Core 3 Projects Using Azure - Second Edition 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.