Microsoft.Extensions.Hosting.WindowsServices 11.0.0-preview.4.26230.115

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

.NET 10.0

.NET Standard 2.1

.NET Standard 2.0

.NET Framework 4.6.2

.NET 11.0

Version Downloads Last updated
11.0.0-preview.4.26230.115 4 05/13/2026
11.0.0-preview.3.26207.106 18 04/14/2026
11.0.0-preview.2.26159.112 24 03/12/2026
11.0.0-preview.1.26104.118 27 02/11/2026
10.0.8 2 05/13/2026
10.0.7 15 04/21/2026
10.0.6 11 04/14/2026
10.0.5 22 03/13/2026
10.0.4 21 03/12/2026
10.0.3 26 02/11/2026
10.0.2 33 01/13/2026
10.0.1 45 12/09/2025
10.0.0 63 11/11/2025
10.0.0-rc.2.25502.107 89 10/15/2025
10.0.0-rc.1.25451.107 74 09/11/2025
10.0.0-preview.7.25380.108 83 08/14/2025
10.0.0-preview.6.25358.103 89 07/16/2025
10.0.0-preview.5.25277.114 77 06/06/2025
10.0.0-preview.4.25258.110 94 05/16/2025
10.0.0-preview.3.25171.5 96 04/11/2025
10.0.0-preview.2.25163.2 101 03/31/2025
10.0.0-preview.1.25080.5 133 03/31/2025
9.0.16 2 05/13/2026
9.0.15 12 04/14/2026
9.0.14 20 03/12/2026
9.0.13 23 02/11/2026
9.0.12 30 01/13/2026
9.0.11 65 11/11/2025
9.0.10 61 10/15/2025
9.0.9 83 09/11/2025
9.0.8 76 08/05/2025
9.0.7 84 07/09/2025
9.0.6 70 06/10/2025
9.0.5 97 05/17/2025
9.0.4 89 04/10/2025
9.0.3 103 03/29/2025
9.0.2 99 03/29/2025
9.0.1 104 03/29/2025
9.0.0 113 11/14/2024
9.0.0-rc.2.24473.5 101 10/22/2024
9.0.0-rc.1.24431.7 94 09/20/2024
9.0.0-preview.7.24405.7 104 08/22/2024
9.0.0-preview.6.24327.7 120 07/23/2024
9.0.0-preview.5.24306.7 135 07/23/2024
9.0.0-preview.4.24266.19 115 07/23/2024
9.0.0-preview.3.24172.9 119 07/21/2024
9.0.0-preview.2.24128.5 118 07/23/2024
9.0.0-preview.1.24080.9 125 07/23/2024
8.0.1 112 10/22/2024
8.0.0 126 04/17/2024
8.0.0-rc.2.23479.6 120 07/23/2024
8.0.0-rc.1.23419.4 120 07/23/2024
8.0.0-preview.7.23375.6 117 07/23/2024
8.0.0-preview.6.23329.7 113 07/23/2024
8.0.0-preview.5.23280.8 135 07/20/2024
8.0.0-preview.4.23259.5 106 07/23/2024
8.0.0-preview.3.23174.8 132 07/23/2024
8.0.0-preview.2.23128.3 128 07/21/2024
8.0.0-preview.1.23110.8 128 07/23/2024
7.0.1 123 07/23/2024
7.0.0 105 07/23/2024
7.0.0-rc.2.22472.3 126 07/22/2024
7.0.0-rc.1.22426.10 119 07/23/2024
7.0.0-preview.7.22375.6 122 07/23/2024
7.0.0-preview.6.22324.4 127 07/18/2024
7.0.0-preview.5.22301.12 137 07/23/2024
7.0.0-preview.4.22229.4 128 07/22/2024
7.0.0-preview.3.22175.4 119 07/22/2024
7.0.0-preview.2.22152.2 124 07/23/2024
7.0.0-preview.1.22076.8 125 07/23/2024
6.0.3 114 11/14/2024
6.0.2 120 07/23/2024
6.0.1 128 07/23/2024
6.0.0 121 07/23/2024
6.0.0-rc.2.21480.5 126 07/23/2024
6.0.0-rc.1.21451.13 129 07/23/2024
6.0.0-preview.7.21377.19 129 07/18/2024
6.0.0-preview.6.21352.12 121 07/23/2024
6.0.0-preview.5.21301.5 116 07/23/2024
6.0.0-preview.4.21253.7 131 07/23/2024
6.0.0-preview.3.21201.4 110 07/23/2024
6.0.0-preview.2.21154.6 123 07/23/2024
5.0.1 138 07/18/2024
5.0.0 116 07/23/2024
5.0.0-rc.2.20478.4 122 07/23/2024
5.0.0-rc.1.20451.7 126 07/23/2024
5.0.0-preview.8.20407.3 125 07/23/2024
5.0.0-preview.7.20365.4 133 07/23/2024
5.0.0-preview.6.20306.1 117 07/23/2024
5.0.0-preview.5.20278.3 126 07/20/2024
5.0.0-preview.4.20251.2 133 07/23/2024
5.0.0-preview.3.20215.2 120 07/21/2024
5.0.0-preview.2.20160.3 128 07/21/2024
5.0.0-preview.1.20120.4 109 07/23/2024
3.1.32 132 07/23/2024
3.1.31 129 07/23/2024
3.1.30 125 07/18/2024
3.1.29 131 07/23/2024
3.1.28 118 07/23/2024
3.1.27 130 07/23/2024
3.1.26 149 07/23/2024
3.1.25 131 07/22/2024
3.1.24 125 07/23/2024
3.1.23 135 07/23/2024
3.1.22 133 07/23/2024
3.1.21 124 07/23/2024
3.1.20 128 07/23/2024
3.1.19 121 07/23/2024
3.1.18 135 07/23/2024
3.1.17 124 07/23/2024
3.1.16 120 07/23/2024
3.1.15 129 07/22/2024
3.1.14 120 07/23/2024
3.1.13 129 07/23/2024
3.1.12 130 07/23/2024
3.1.11 114 07/23/2024
3.1.10 118 07/23/2024
3.1.9 134 07/23/2024
3.1.8 109 07/23/2024
3.1.7 132 07/23/2024
3.1.6 138 07/23/2024
3.1.5 134 07/23/2024
3.1.4 120 07/19/2024
3.1.3 131 07/23/2024
3.1.2 137 07/23/2024
3.1.1 131 07/23/2024
3.1.0 123 07/23/2024
3.1.0-preview3.19553.2 119 07/23/2024
3.1.0-preview2.19525.4 116 07/23/2024
3.1.0-preview1.19506.1 135 07/23/2024
3.0.3 118 07/23/2024
3.0.2 120 07/23/2024
3.0.1 129 07/23/2024
3.0.0 125 07/23/2024
3.0.0-rc1.19456.10 124 07/23/2024
3.0.0-preview9.19423.4 120 07/23/2024
3.0.0-preview8.19405.4 122 07/23/2024
3.0.0-preview7.19362.4 124 07/22/2024
3.0.0-preview6.19304.6 117 07/20/2024
3.0.0-preview5.19227.9 107 07/23/2024
3.0.0-preview4.19216.2 119 07/23/2024
3.0.0-preview3.19153.1 135 07/23/2024