.NET Core 3.0 introduced a new WorkerService template that can be used as a starting point for long running service apps. As the worker service template didn’t use a Startup.cs file like in a traditional ASP.NET Core application, it wasn’t immediately obvious to me where I had to configure my IoC container.
So a quick tip for my future self, you can do this using the ConfigureContainer() method on the HostBuilder:
Remark: The example above is using Autofac but the approach is similar for other containers.