Microsoft.Extensions.Hosting.WindowsServices 10.0.11
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.WindowsServiceLifetimeHostBuilderExtensionsMicrosoft.Extensions.Hosting.WindowsServices.WindowsServiceLifetime
Additional Documentation
- WindowsServiceLifetime
- WindowsServiceLifetimeHostBuilderExtensions
- Create Windows Service using BackgroundService
- Host ASP.NET Core in a Windows Service
Related Packages
Microsoft.Extensions.HostingSystem.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 Framework 4.6.2
- Microsoft.Extensions.Hosting (>= 10.0.11)
- Microsoft.Extensions.Logging.EventLog (>= 10.0.11)
.NET Standard 2.1
- System.ServiceProcess.ServiceController (>= 10.0.11)
- Microsoft.Extensions.Logging.EventLog (>= 10.0.11)
- Microsoft.Extensions.Hosting (>= 10.0.11)
.NET Standard 2.0
- System.ServiceProcess.ServiceController (>= 10.0.11)
- Microsoft.Extensions.Logging.EventLog (>= 10.0.11)
- Microsoft.Extensions.Hosting (>= 10.0.11)
.NET 10.0
- System.ServiceProcess.ServiceController (>= 10.0.11)
- Microsoft.Extensions.Logging.EventLog (>= 10.0.11)
- Microsoft.Extensions.Hosting (>= 10.0.11)
.NET 9.0
- System.ServiceProcess.ServiceController (>= 10.0.11)
- Microsoft.Extensions.Logging.EventLog (>= 10.0.11)
- Microsoft.Extensions.Hosting (>= 10.0.11)
.NET 8.0
- System.ServiceProcess.ServiceController (>= 10.0.11)
- Microsoft.Extensions.Logging.EventLog (>= 10.0.11)
- Microsoft.Extensions.Hosting (>= 10.0.11)
| Version | Downloads | Last updated |
|---|---|---|
| 11.0.0-preview.7.26381.103 | 1 | 08/12/2026 |
| 11.0.0-preview.6.26359.118 | 16 | 07/15/2026 |
| 11.0.0-preview.5.26302.115 | 24 | 06/10/2026 |
| 11.0.0-preview.4.26230.115 | 35 | 05/13/2026 |
| 11.0.0-preview.3.26207.106 | 40 | 04/14/2026 |
| 11.0.0-preview.2.26159.112 | 48 | 03/12/2026 |
| 11.0.0-preview.1.26104.118 | 44 | 02/11/2026 |
| 10.0.11 | 1 | 08/12/2026 |
| 10.0.10 | 12 | 07/15/2026 |
| 10.0.9 | 17 | 06/10/2026 |
| 10.0.8 | 20 | 05/13/2026 |
| 10.0.7 | 33 | 04/21/2026 |
| 10.0.6 | 34 | 04/14/2026 |
| 10.0.5 | 40 | 03/13/2026 |
| 10.0.4 | 42 | 03/12/2026 |
| 10.0.3 | 43 | 02/11/2026 |
| 10.0.2 | 49 | 01/13/2026 |
| 10.0.1 | 65 | 12/09/2025 |
| 10.0.0 | 92 | 11/11/2025 |
| 10.0.0-rc.2.25502.107 | 106 | 10/15/2025 |
| 10.0.0-rc.1.25451.107 | 93 | 09/11/2025 |
| 10.0.0-preview.7.25380.108 | 102 | 08/14/2025 |
| 10.0.0-preview.6.25358.103 | 108 | 07/16/2025 |
| 10.0.0-preview.5.25277.114 | 93 | 06/06/2025 |
| 10.0.0-preview.4.25258.110 | 111 | 05/16/2025 |
| 10.0.0-preview.3.25171.5 | 111 | 04/11/2025 |
| 10.0.0-preview.2.25163.2 | 116 | 03/31/2025 |
| 10.0.0-preview.1.25080.5 | 148 | 03/31/2025 |
| 9.0.19 | 2 | 08/12/2026 |
| 9.0.18 | 11 | 07/15/2026 |
| 9.0.17 | 18 | 06/10/2026 |
| 9.0.16 | 22 | 05/13/2026 |
| 9.0.15 | 33 | 04/14/2026 |
| 9.0.14 | 30 | 03/12/2026 |
| 9.0.13 | 41 | 02/11/2026 |
| 9.0.12 | 56 | 01/13/2026 |
| 9.0.11 | 84 | 11/11/2025 |
| 9.0.10 | 78 | 10/15/2025 |
| 9.0.9 | 102 | 09/11/2025 |
| 9.0.8 | 94 | 08/05/2025 |
| 9.0.7 | 105 | 07/09/2025 |
| 9.0.6 | 81 | 06/10/2025 |
| 9.0.5 | 114 | 05/17/2025 |
| 9.0.4 | 114 | 04/10/2025 |
| 9.0.3 | 125 | 03/29/2025 |
| 9.0.2 | 117 | 03/29/2025 |
| 9.0.1 | 122 | 03/29/2025 |
| 9.0.0 | 131 | 11/14/2024 |
| 9.0.0-rc.2.24473.5 | 116 | 10/22/2024 |
| 9.0.0-rc.1.24431.7 | 112 | 09/20/2024 |
| 9.0.0-preview.7.24405.7 | 121 | 08/22/2024 |
| 9.0.0-preview.6.24327.7 | 139 | 07/23/2024 |
| 9.0.0-preview.5.24306.7 | 148 | 07/23/2024 |
| 9.0.0-preview.4.24266.19 | 131 | 07/23/2024 |
| 9.0.0-preview.3.24172.9 | 134 | 07/21/2024 |
| 9.0.0-preview.2.24128.5 | 137 | 07/23/2024 |
| 9.0.0-preview.1.24080.9 | 140 | 07/23/2024 |
| 8.0.1 | 134 | 10/22/2024 |
| 8.0.0 | 146 | 04/17/2024 |
| 8.0.0-rc.2.23479.6 | 140 | 07/23/2024 |
| 8.0.0-rc.1.23419.4 | 145 | 07/23/2024 |
| 8.0.0-preview.7.23375.6 | 134 | 07/23/2024 |
| 8.0.0-preview.6.23329.7 | 133 | 07/23/2024 |
| 8.0.0-preview.5.23280.8 | 157 | 07/20/2024 |
| 8.0.0-preview.4.23259.5 | 125 | 07/23/2024 |
| 8.0.0-preview.3.23174.8 | 148 | 07/23/2024 |
| 8.0.0-preview.2.23128.3 | 147 | 07/21/2024 |
| 8.0.0-preview.1.23110.8 | 143 | 07/23/2024 |
| 7.0.1 | 144 | 07/23/2024 |
| 7.0.0 | 122 | 07/23/2024 |
| 7.0.0-rc.2.22472.3 | 142 | 07/22/2024 |
| 7.0.0-rc.1.22426.10 | 134 | 07/23/2024 |
| 7.0.0-preview.7.22375.6 | 139 | 07/23/2024 |
| 7.0.0-preview.6.22324.4 | 146 | 07/18/2024 |
| 7.0.0-preview.5.22301.12 | 157 | 07/23/2024 |
| 7.0.0-preview.4.22229.4 | 139 | 07/22/2024 |
| 7.0.0-preview.3.22175.4 | 136 | 07/22/2024 |
| 7.0.0-preview.2.22152.2 | 141 | 07/23/2024 |
| 7.0.0-preview.1.22076.8 | 146 | 07/23/2024 |
| 6.0.3 | 133 | 11/14/2024 |
| 6.0.2 | 139 | 07/23/2024 |
| 6.0.1 | 145 | 07/23/2024 |
| 6.0.0 | 143 | 07/23/2024 |
| 6.0.0-rc.2.21480.5 | 141 | 07/23/2024 |
| 6.0.0-rc.1.21451.13 | 138 | 07/23/2024 |
| 6.0.0-preview.7.21377.19 | 145 | 07/18/2024 |
| 6.0.0-preview.6.21352.12 | 140 | 07/23/2024 |
| 6.0.0-preview.5.21301.5 | 130 | 07/23/2024 |
| 6.0.0-preview.4.21253.7 | 150 | 07/23/2024 |
| 6.0.0-preview.3.21201.4 | 132 | 07/23/2024 |
| 6.0.0-preview.2.21154.6 | 141 | 07/23/2024 |
| 5.0.1 | 158 | 07/18/2024 |
| 5.0.0 | 135 | 07/23/2024 |
| 5.0.0-rc.2.20478.4 | 138 | 07/23/2024 |
| 5.0.0-rc.1.20451.7 | 145 | 07/23/2024 |
| 5.0.0-preview.8.20407.3 | 141 | 07/23/2024 |
| 5.0.0-preview.7.20365.4 | 148 | 07/23/2024 |
| 5.0.0-preview.6.20306.1 | 132 | 07/23/2024 |
| 5.0.0-preview.5.20278.3 | 147 | 07/20/2024 |
| 5.0.0-preview.4.20251.2 | 147 | 07/23/2024 |
| 5.0.0-preview.3.20215.2 | 138 | 07/21/2024 |
| 5.0.0-preview.2.20160.3 | 144 | 07/21/2024 |
| 5.0.0-preview.1.20120.4 | 131 | 07/23/2024 |
| 3.1.32 | 148 | 07/23/2024 |
| 3.1.31 | 140 | 07/23/2024 |
| 3.1.30 | 136 | 07/18/2024 |
| 3.1.29 | 147 | 07/23/2024 |
| 3.1.28 | 137 | 07/23/2024 |
| 3.1.27 | 154 | 07/23/2024 |
| 3.1.26 | 158 | 07/23/2024 |
| 3.1.25 | 146 | 07/22/2024 |
| 3.1.24 | 143 | 07/23/2024 |
| 3.1.23 | 150 | 07/23/2024 |
| 3.1.22 | 154 | 07/23/2024 |
| 3.1.21 | 141 | 07/23/2024 |
| 3.1.20 | 146 | 07/23/2024 |
| 3.1.19 | 141 | 07/23/2024 |
| 3.1.18 | 152 | 07/23/2024 |
| 3.1.17 | 141 | 07/23/2024 |
| 3.1.16 | 139 | 07/23/2024 |
| 3.1.15 | 145 | 07/22/2024 |
| 3.1.14 | 133 | 07/23/2024 |
| 3.1.13 | 147 | 07/23/2024 |
| 3.1.12 | 151 | 07/23/2024 |
| 3.1.11 | 130 | 07/23/2024 |
| 3.1.10 | 135 | 07/23/2024 |
| 3.1.9 | 150 | 07/23/2024 |
| 3.1.8 | 128 | 07/23/2024 |
| 3.1.7 | 162 | 07/23/2024 |
| 3.1.6 | 153 | 07/23/2024 |
| 3.1.5 | 152 | 07/23/2024 |
| 3.1.4 | 138 | 07/19/2024 |
| 3.1.3 | 148 | 07/23/2024 |
| 3.1.2 | 155 | 07/23/2024 |
| 3.1.1 | 146 | 07/23/2024 |
| 3.1.0 | 139 | 07/23/2024 |
| 3.1.0-preview3.19553.2 | 131 | 07/23/2024 |
| 3.1.0-preview2.19525.4 | 138 | 07/23/2024 |
| 3.1.0-preview1.19506.1 | 146 | 07/23/2024 |
| 3.0.3 | 137 | 07/23/2024 |
| 3.0.2 | 129 | 07/23/2024 |
| 3.0.1 | 150 | 07/23/2024 |
| 3.0.0 | 144 | 07/23/2024 |
| 3.0.0-rc1.19456.10 | 133 | 07/23/2024 |
| 3.0.0-preview9.19423.4 | 139 | 07/23/2024 |
| 3.0.0-preview8.19405.4 | 137 | 07/23/2024 |
| 3.0.0-preview7.19362.4 | 144 | 07/22/2024 |
| 3.0.0-preview6.19304.6 | 138 | 07/20/2024 |
| 3.0.0-preview5.19227.9 | 123 | 07/23/2024 |
| 3.0.0-preview4.19216.2 | 136 | 07/23/2024 |
| 3.0.0-preview3.19153.1 | 153 | 07/23/2024 |