Microsoft.Extensions.Hosting.WindowsServices 9.0.13

About

Supports using Windows Services with the hosting infrastructure.

Key Features

  • Can configure a host to be a Windows Service.

How to Use

From a Worker Service app created using the Visual Studio template:

IHost host = Host.CreateDefaultBuilder(args)
    .ConfigureServices(services =>
    {
        services.AddHostedService<Worker>();
    })
    // Configure as a Windows Service
    .UseWindowsService(options =>
    {
        options.ServiceName = "My Service";
    })
    .Build();

host.Run();

Main Types

The main types provided by this library are:

  • Microsoft.Extensions.Hosting.WindowsServiceLifetimeHostBuilderExtensions
  • Microsoft.Extensions.Hosting.WindowsServices.WindowsServiceLifetime

Additional Documentation

  • Microsoft.Extensions.Hosting
  • System.ServiceProcess.ServiceController

Feedback & Contributing

Microsoft.Extensions.Hosting.WindowsServices is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

No packages depend on Microsoft.Extensions.Hosting.WindowsServices.

https://go.microsoft.com/fwlink/?LinkID=799421

Version Downloads Last updated
11.0.0-preview.1.26104.118 1 02/11/2026
10.0.3 1 02/11/2026
10.0.2 11 01/13/2026
10.0.1 20 12/09/2025
10.0.0 37 11/11/2025
10.0.0-rc.2.25502.107 48 10/15/2025
10.0.0-rc.1.25451.107 57 09/11/2025
10.0.0-preview.7.25380.108 62 08/14/2025
10.0.0-preview.6.25358.103 67 07/16/2025
10.0.0-preview.5.25277.114 58 06/06/2025
10.0.0-preview.4.25258.110 72 05/16/2025
10.0.0-preview.3.25171.5 76 04/11/2025
10.0.0-preview.2.25163.2 82 03/31/2025
10.0.0-preview.1.25080.5 97 03/31/2025
9.0.13 3 02/11/2026
9.0.12 7 01/13/2026
9.0.11 43 11/11/2025
9.0.10 43 10/15/2025
9.0.9 67 09/11/2025
9.0.8 58 08/05/2025
9.0.7 68 07/09/2025
9.0.6 57 06/10/2025
9.0.5 79 05/17/2025
9.0.4 77 04/10/2025
9.0.3 88 03/29/2025
9.0.2 85 03/29/2025
9.0.1 88 03/29/2025
9.0.0 94 11/14/2024
9.0.0-rc.2.24473.5 85 10/22/2024
9.0.0-rc.1.24431.7 82 09/20/2024
9.0.0-preview.7.24405.7 89 08/22/2024
9.0.0-preview.6.24327.7 102 07/23/2024
9.0.0-preview.5.24306.7 117 07/23/2024
9.0.0-preview.4.24266.19 101 07/23/2024
9.0.0-preview.3.24172.9 106 07/21/2024
9.0.0-preview.2.24128.5 101 07/23/2024
9.0.0-preview.1.24080.9 101 07/23/2024
8.0.1 92 10/22/2024
8.0.0 109 04/17/2024
8.0.0-rc.2.23479.6 102 07/23/2024
8.0.0-rc.1.23419.4 106 07/23/2024
8.0.0-preview.7.23375.6 100 07/23/2024
8.0.0-preview.6.23329.7 96 07/23/2024
8.0.0-preview.5.23280.8 117 07/20/2024
8.0.0-preview.4.23259.5 89 07/23/2024
8.0.0-preview.3.23174.8 110 07/23/2024
8.0.0-preview.2.23128.3 107 07/21/2024
8.0.0-preview.1.23110.8 110 07/23/2024
7.0.1 103 07/23/2024
7.0.0 91 07/23/2024
7.0.0-rc.2.22472.3 112 07/22/2024
7.0.0-rc.1.22426.10 105 07/23/2024
7.0.0-preview.7.22375.6 104 07/23/2024
7.0.0-preview.6.22324.4 103 07/18/2024
7.0.0-preview.5.22301.12 125 07/23/2024
7.0.0-preview.4.22229.4 113 07/22/2024
7.0.0-preview.3.22175.4 107 07/22/2024
7.0.0-preview.2.22152.2 106 07/23/2024
7.0.0-preview.1.22076.8 109 07/23/2024
6.0.3 86 11/14/2024
6.0.2 104 07/23/2024
6.0.1 109 07/23/2024
6.0.0 107 07/23/2024
6.0.0-rc.2.21480.5 110 07/23/2024
6.0.0-rc.1.21451.13 114 07/23/2024
6.0.0-preview.7.21377.19 111 07/18/2024
6.0.0-preview.6.21352.12 105 07/23/2024
6.0.0-preview.5.21301.5 97 07/23/2024
6.0.0-preview.4.21253.7 111 07/23/2024
6.0.0-preview.3.21201.4 98 07/23/2024
6.0.0-preview.2.21154.6 105 07/23/2024
5.0.1 113 07/18/2024
5.0.0 98 07/23/2024
5.0.0-rc.2.20478.4 105 07/23/2024
5.0.0-rc.1.20451.7 109 07/23/2024
5.0.0-preview.8.20407.3 110 07/23/2024
5.0.0-preview.7.20365.4 118 07/23/2024
5.0.0-preview.6.20306.1 99 07/23/2024
5.0.0-preview.5.20278.3 109 07/20/2024
5.0.0-preview.4.20251.2 117 07/23/2024
5.0.0-preview.3.20215.2 107 07/21/2024
5.0.0-preview.2.20160.3 112 07/21/2024
5.0.0-preview.1.20120.4 95 07/23/2024
3.1.32 114 07/23/2024
3.1.31 112 07/23/2024
3.1.30 105 07/18/2024
3.1.29 110 07/23/2024
3.1.28 100 07/23/2024
3.1.27 114 07/23/2024
3.1.26 130 07/23/2024
3.1.25 111 07/22/2024
3.1.24 110 07/23/2024
3.1.23 120 07/23/2024
3.1.22 116 07/23/2024
3.1.21 109 07/23/2024
3.1.20 110 07/23/2024
3.1.19 101 07/23/2024
3.1.18 114 07/23/2024
3.1.17 102 07/23/2024
3.1.16 103 07/23/2024
3.1.15 108 07/22/2024
3.1.14 102 07/23/2024
3.1.13 110 07/23/2024
3.1.12 107 07/23/2024
3.1.11 99 07/23/2024
3.1.10 100 07/23/2024
3.1.9 107 07/23/2024
3.1.8 94 07/23/2024
3.1.7 113 07/23/2024
3.1.6 125 07/23/2024
3.1.5 118 07/23/2024
3.1.4 108 07/19/2024
3.1.3 115 07/23/2024
3.1.2 116 07/23/2024
3.1.1 116 07/23/2024
3.1.0 108 07/23/2024
3.1.0-preview3.19553.2 101 07/23/2024
3.1.0-preview2.19525.4 101 07/23/2024
3.1.0-preview1.19506.1 105 07/23/2024
3.0.3 102 07/23/2024
3.0.2 106 07/23/2024
3.0.1 113 07/23/2024
3.0.0 109 07/23/2024
3.0.0-rc1.19456.10 109 07/23/2024
3.0.0-preview9.19423.4 106 07/23/2024
3.0.0-preview8.19405.4 103 07/23/2024
3.0.0-preview7.19362.4 107 07/22/2024
3.0.0-preview6.19304.6 103 07/20/2024
3.0.0-preview5.19227.9 92 07/23/2024
3.0.0-preview4.19216.2 99 07/23/2024
3.0.0-preview3.19153.1 113 07/23/2024