ASP.Net Core 3.0 Preview 3 adds support for creating worker services, which are background services like Windows services and Linux daemons. There is a new template for creating a worker service in Visual Studio as well.

To work with worker services in Visual Studio, you should have the beta versions (Preview Version 3 or later) of ASP.Net Core 3.0 and .Net Core 3.0 runtimes installed on your system.

Create a new worker service application

First, let’s create an ASP.Net Core project in Visual Studio 2019. Follow these steps o create a new ASP.Net Core project in Visual Studio:

  1. Launch the Visual Studio IDE.
  2. Click Create New Project.
  3. In the Create New Project window, select ASP.Net Core Web Application from the list of templates.
  4. Click Next.
  5. In the Configure Your New Project window that appears, specify the name and location for the new project.
  6. Click Create.
  7. The window Create New ASP.Net Core Web Application appears.
  8. Select .Net Core as the runtime and ASP.Net Core 3.0 (or later) from the dropdown menu at the top.
  9. Select Worker Service as the project template to create a new worker service application
  10. Ensure that the check box Enable Docker Support is unchecked, because you won’t be using this feature here.
  11. Ensure that Authentication is set as No Authentication, because you won’t be using authentication either.
  12. Click Create.