Microsoft.Extensions.Hosting.WindowsServices 9.0.0-rc.2.24473.5

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 Framework 4.6.2

.NET Standard 2.1

.NET Standard 2.0

.NET 9.0

.NET 8.0

Version Downloads Last updated
9.0.0-rc.2.24473.5 4 15.10.2024
9.0.0-rc.1.24431.7 3 22.09.2024
9.0.0-preview.7.24405.7 3 25.09.2024
9.0.0-preview.6.24327.7 3 19.10.2024
9.0.0-preview.3.24172.9 3 25.09.2024
9.0.0-preview.2.24128.5 3 22.09.2024
8.0.1 2 28.10.2024
8.0.0 9 07.02.2024
8.0.0-rc.2.23479.6 3 22.09.2024
8.0.0-preview.6.23329.7 6 22.09.2024
8.0.0-preview.5.23280.8 3 19.10.2024
8.0.0-preview.4.23259.5 5 22.09.2024
8.0.0-preview.1.23110.8 4 22.09.2024
7.0.1 5 22.09.2024
7.0.0 5 28.02.2024
7.0.0-rc.2.22472.3 4 25.09.2024
7.0.0-rc.1.22426.10 3 19.10.2024
7.0.0-preview.6.22324.4 5 22.09.2024
7.0.0-preview.5.22301.12 5 22.09.2024
7.0.0-preview.3.22175.4 6 22.09.2024
7.0.0-preview.2.22152.2 3 19.10.2024
7.0.0-preview.1.22076.8 3 19.10.2024
6.0.2 4 19.10.2024
6.0.1 3 22.09.2024
6.0.0 3 20.10.2024
6.0.0-rc.1.21451.13 4 22.09.2024
6.0.0-preview.7.21377.19 2 28.10.2024
6.0.0-preview.6.21352.12 2 28.10.2024
6.0.0-preview.5.21301.5 4 22.09.2024
6.0.0-preview.4.21253.7 4 19.10.2024
6.0.0-preview.3.21201.4 5 22.09.2024
6.0.0-preview.2.21154.6 4 22.09.2024
5.0.1 5 18.03.2024
5.0.0 2 28.10.2024
5.0.0-rc.2.20478.4 4 22.09.2024
5.0.0-rc.1.20451.7 3 25.09.2024
5.0.0-preview.8.20407.3 3 19.10.2024
5.0.0-preview.4.20251.2 4 25.09.2024
5.0.0-preview.1.20120.4 4 25.09.2024
3.1.32 3 19.10.2024
3.1.30 6 22.09.2024
3.1.28 4 19.10.2024
3.1.27 3 22.09.2024
3.1.26 3 22.09.2024
3.1.25 3 19.10.2024
3.1.24 5 22.09.2024
3.1.23 5 22.09.2024
3.1.21 4 22.09.2024
3.1.18 5 22.09.2024
3.1.17 3 22.09.2024
3.1.16 4 22.09.2024
3.1.15 3 22.09.2024
3.1.14 3 22.09.2024
3.1.12 3 20.10.2024
3.1.9 2 25.09.2024
3.1.8 4 19.10.2024
3.1.6 5 22.09.2024
3.1.5 3 19.10.2024
3.1.4 4 22.09.2024
3.1.3 3 22.09.2024
3.1.1 4 22.09.2024
3.1.0 5 25.09.2024
3.1.0-preview3.19553.2 5 25.09.2024
3.0.3 3 22.09.2024
3.0.1 4 22.09.2024
3.0.0 3 22.09.2024
3.0.0-rc1.19456.10 3 25.09.2024
3.0.0-preview6.19304.6 3 22.09.2024
3.0.0-preview5.19227.9 6 22.09.2024
3.0.0-preview4.19216.2 4 22.09.2024
3.0.0-preview3.19153.1 3 22.09.2024