Microsoft.Extensions.Hosting.WindowsServices 9.0.0
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
- WindowsServiceLifetime
- WindowsServiceLifetimeHostBuilderExtensions
- Create Windows Service using BackgroundService
- Host ASP.NET Core in a Windows Service
Related Packages
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 Framework 4.6.2
- Microsoft.Extensions.Hosting (>= 9.0.0)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0)
.NET Standard 2.1
- System.ServiceProcess.ServiceController (>= 9.0.0)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0)
- Microsoft.Extensions.Hosting (>= 9.0.0)
.NET Standard 2.0
- System.ServiceProcess.ServiceController (>= 9.0.0)
- Microsoft.Extensions.Hosting (>= 9.0.0)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0)
.NET 9.0
- System.ServiceProcess.ServiceController (>= 9.0.0)
- Microsoft.Extensions.Hosting (>= 9.0.0)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0)
.NET 8.0
- System.ServiceProcess.ServiceController (>= 9.0.0)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0)
- Microsoft.Extensions.Hosting (>= 9.0.0)
Version | Downloads | Last updated |
---|---|---|
9.0.0 | 15 | 11/14/2024 |
9.0.0-rc.2.24473.5 | 10 | 10/22/2024 |
9.0.0-rc.1.24431.7 | 14 | 09/20/2024 |
9.0.0-preview.7.24405.7 | 9 | 08/22/2024 |
9.0.0-preview.6.24327.7 | 29 | 07/23/2024 |
9.0.0-preview.5.24306.7 | 45 | 07/23/2024 |
9.0.0-preview.4.24266.19 | 28 | 07/23/2024 |
9.0.0-preview.3.24172.9 | 35 | 07/21/2024 |
9.0.0-preview.2.24128.5 | 29 | 07/23/2024 |
9.0.0-preview.1.24080.9 | 21 | 07/23/2024 |
8.0.1 | 5 | 10/22/2024 |
8.0.0 | 28 | 04/17/2024 |
8.0.0-rc.2.23479.6 | 28 | 07/23/2024 |
8.0.0-rc.1.23419.4 | 32 | 07/23/2024 |
8.0.0-preview.7.23375.6 | 30 | 07/23/2024 |
8.0.0-preview.6.23329.7 | 22 | 07/23/2024 |
8.0.0-preview.5.23280.8 | 36 | 07/20/2024 |
8.0.0-preview.4.23259.5 | 24 | 07/23/2024 |
8.0.0-preview.3.23174.8 | 30 | 07/23/2024 |
8.0.0-preview.2.23128.3 | 34 | 07/21/2024 |
8.0.0-preview.1.23110.8 | 32 | 07/23/2024 |
7.0.1 | 25 | 07/23/2024 |
7.0.0 | 16 | 07/23/2024 |
7.0.0-rc.2.22472.3 | 26 | 07/22/2024 |
7.0.0-rc.1.22426.10 | 30 | 07/23/2024 |
7.0.0-preview.7.22375.6 | 22 | 07/23/2024 |
7.0.0-preview.6.22324.4 | 24 | 07/18/2024 |
7.0.0-preview.5.22301.12 | 46 | 07/23/2024 |
7.0.0-preview.4.22229.4 | 36 | 07/22/2024 |
7.0.0-preview.3.22175.4 | 28 | 07/22/2024 |
7.0.0-preview.2.22152.2 | 30 | 07/23/2024 |
7.0.0-preview.1.22076.8 | 24 | 07/23/2024 |
6.0.3 | 5 | 11/14/2024 |
6.0.2 | 27 | 07/23/2024 |
6.0.1 | 31 | 07/23/2024 |
6.0.0 | 29 | 07/23/2024 |
6.0.0-rc.2.21480.5 | 32 | 07/23/2024 |
6.0.0-rc.1.21451.13 | 29 | 07/23/2024 |
6.0.0-preview.7.21377.19 | 34 | 07/18/2024 |
6.0.0-preview.6.21352.12 | 30 | 07/23/2024 |
6.0.0-preview.5.21301.5 | 22 | 07/23/2024 |
6.0.0-preview.4.21253.7 | 37 | 07/23/2024 |
6.0.0-preview.3.21201.4 | 27 | 07/23/2024 |
6.0.0-preview.2.21154.6 | 28 | 07/23/2024 |
5.0.1 | 32 | 07/18/2024 |
5.0.0 | 25 | 07/23/2024 |
5.0.0-rc.2.20478.4 | 26 | 07/23/2024 |
5.0.0-rc.1.20451.7 | 23 | 07/23/2024 |
5.0.0-preview.8.20407.3 | 35 | 07/23/2024 |
5.0.0-preview.7.20365.4 | 38 | 07/23/2024 |
5.0.0-preview.6.20306.1 | 27 | 07/23/2024 |
5.0.0-preview.5.20278.3 | 29 | 07/20/2024 |
5.0.0-preview.4.20251.2 | 30 | 07/23/2024 |
5.0.0-preview.3.20215.2 | 37 | 07/21/2024 |
5.0.0-preview.2.20160.3 | 34 | 07/21/2024 |
5.0.0-preview.1.20120.4 | 28 | 07/23/2024 |
3.1.32 | 24 | 07/23/2024 |
3.1.31 | 35 | 07/23/2024 |
3.1.30 | 33 | 07/18/2024 |
3.1.29 | 24 | 07/23/2024 |
3.1.28 | 28 | 07/23/2024 |
3.1.27 | 34 | 07/23/2024 |
3.1.26 | 39 | 07/23/2024 |
3.1.25 | 28 | 07/22/2024 |
3.1.24 | 31 | 07/23/2024 |
3.1.23 | 32 | 07/23/2024 |
3.1.22 | 36 | 07/23/2024 |
3.1.21 | 35 | 07/23/2024 |
3.1.20 | 31 | 07/23/2024 |
3.1.19 | 27 | 07/23/2024 |
3.1.18 | 34 | 07/23/2024 |
3.1.17 | 28 | 07/23/2024 |
3.1.16 | 22 | 07/23/2024 |
3.1.15 | 38 | 07/22/2024 |
3.1.14 | 24 | 07/23/2024 |
3.1.13 | 27 | 07/23/2024 |
3.1.12 | 26 | 07/23/2024 |
3.1.11 | 23 | 07/23/2024 |
3.1.10 | 27 | 07/23/2024 |
3.1.9 | 34 | 07/23/2024 |
3.1.8 | 27 | 07/23/2024 |
3.1.7 | 28 | 07/23/2024 |
3.1.6 | 34 | 07/23/2024 |
3.1.5 | 30 | 07/23/2024 |
3.1.4 | 36 | 07/19/2024 |
3.1.3 | 25 | 07/23/2024 |
3.1.2 | 29 | 07/23/2024 |
3.1.1 | 39 | 07/23/2024 |
3.1.0 | 28 | 07/23/2024 |
3.1.0-preview3.19553.2 | 28 | 07/23/2024 |
3.1.0-preview2.19525.4 | 24 | 07/23/2024 |
3.1.0-preview1.19506.1 | 26 | 07/23/2024 |
3.0.3 | 26 | 07/23/2024 |
3.0.2 | 30 | 07/23/2024 |
3.0.1 | 28 | 07/23/2024 |
3.0.0 | 31 | 07/23/2024 |
3.0.0-rc1.19456.10 | 32 | 07/23/2024 |
3.0.0-preview9.19423.4 | 31 | 07/23/2024 |
3.0.0-preview8.19405.4 | 33 | 07/23/2024 |
3.0.0-preview7.19362.4 | 35 | 07/22/2024 |
3.0.0-preview6.19304.6 | 28 | 07/20/2024 |
3.0.0-preview5.19227.9 | 21 | 07/23/2024 |
3.0.0-preview4.19216.2 | 25 | 07/23/2024 |
3.0.0-preview3.19153.1 | 38 | 07/23/2024 |