The Core of .NET

VSTH08 The Background on Background Tasks in .NET 9


9:30am - 10:45am

Level: Introductory

Scott Sauber

Director of Engineering

Lean TECHniques Inc

Need to run a task in the background in .NET 9? There are lots of scenarios for background tasks ranging from a task that runs for a long time, or perhaps an operation that needs to be retried multiple times if it fails, and many other scenarios in between. While there are lots of scenarios for background tasks, there are also lots of solutions to this problem that can leave a .NET developer unsure of which to choose from. Solutions such as IHostedServices, BackgroundServices, Worker Services, Hangfire, and more. In this talk, we'll break down all of these solutions with their pro's and con's and when to choose one over the other, as well as a deep dive on how these all work under the hood.

You will learn:

  • Situations for using a background task
  • When to use one option over another (IHostedService, BackgroundService, Worker, etc)
  • Understand how these options work under the hood