Microsoft.Extensions.Hosting 9.0.0-preview.5.24306.7
About
Contains the .NET Generic Host HostBuilder
which layers on the Microsoft.Extensions.Hosting.Abstractions
package.
Key Features
- Contains the .NET Generic Host
HostBuilder
.
How to Use
For a console app project:
using (IHost host = new HostBuilder().Build())
{
var lifetime = host.Services.GetRequiredService<IHostApplicationLifetime>();
lifetime.ApplicationStarted.Register(() =>
{
Console.WriteLine("Started");
});
lifetime.ApplicationStopping.Register(() =>
{
Console.WriteLine("Stopping firing");
Console.WriteLine("Stopping end");
});
lifetime.ApplicationStopped.Register(() =>
{
Console.WriteLine("Stopped firing");
Console.WriteLine("Stopped end");
});
host.Start();
// Listens for Ctrl+C.
host.WaitForShutdown();
}
Main Types
The main types provided by this library are:
Microsoft.Extensions.Host
.Microsoft.Extensions.Hosting.HostApplicationBuilder
Microsoft.Extensions.Hosting.HostBuilder
Microsoft.Extensions.Hosting.IHostedService
Microsoft.Extensions.Hosting.IHostedLifecycleService
Additional Documentation
- Generic host
- API documentation
Related Packages
Microsoft.Extensions.Configuration
Microsoft.Extensions.DependencyInjection
Microsoft.Extensions.Hosting.Abstractions
Microsoft.Extensions.Logging
Microsoft.Extensions.Options
Feedback & Contributing
Microsoft.Extensions.Hosting is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Showing the top 20 packages that depend on Microsoft.Extensions.Hosting.
Packages | Downloads |
---|---|
Akka.Hosting
YOUR_DESCRIPTION_HERE
|
150 |
Akka.Hosting
Akka.NET Microsoft.Extensions.Hosting support.
|
135 |
Akka.Hosting
Akka.NET Microsoft.Extensions.Hosting support.
|
131 |
Microsoft.Azure.Functions.Worker.Grpc
This library provides gRPC support for Azure Functions .NET Worker communication with the Azure Functions Host.
|
49 |
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
49 |
Microsoft.AspNetCore.Mvc.Testing
Support for writing functional tests for MVC applications.
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/d27c0100bc8b9b93eb8102b097c20b40f7de9c49
|
47 |
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
46 |
Akka.Hosting
Akka.NET Microsoft.Extensions.Hosting support.
|
39 |
Microsoft.AspNetCore.Mvc.Testing
Support for writing functional tests for MVC applications.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/d62be99ba6e73feb46d7b64a6b4ce8610dc9040a
|
39 |
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
36 |
Microsoft.AspNetCore.App
Microsoft.AspNetCore.App
|
35 |
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
32 |
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
This package was built from the source at:
https://github.com/aspnet/Universe/tree/244e037a222a7cd0a17feafb7f3a625fde40de97
|
30 |
Akka.Hosting
Akka.NET Microsoft.Extensions.Hosting support.
|
27 |
Microsoft.Azure.Functions.Worker
This library enables you to create an Azure Functions .NET Worker, adding support for the isolated, out-of-process execution model.
|
26 |
Akka.Hosting
Akka.NET Microsoft.Extensions.Hosting support.
|
25 |
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
24 |
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
23 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.0-preview.5.24306.7)
- System.Threading.Tasks.Extensions (>= 4.5.4)
- Microsoft.Extensions.Options (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventSource (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Debug (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Console (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Configuration (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.FileProviders.Physical (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Diagnostics (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.UserSecrets (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Json (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.CommandLine (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0-preview.5.24306.7)
.NET Standard 2.0
- Microsoft.Extensions.Logging.Configuration (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.FileProviders.Physical (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Diagnostics (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.UserSecrets (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Json (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.CommandLine (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Console (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Debug (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventSource (>= 9.0.0-preview.5.24306.7)
- System.Threading.Tasks.Extensions (>= 4.5.4)
- Microsoft.Extensions.Options (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0-preview.5.24306.7)
.NET 9.0
- Microsoft.Extensions.Options (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventSource (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Debug (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Console (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Configuration (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.FileProviders.Physical (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Diagnostics (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.UserSecrets (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Json (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.CommandLine (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0-preview.5.24306.7)
.NET Standard 2.1
- Microsoft.Extensions.Options (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventSource (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Debug (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Console (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Configuration (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.FileProviders.Physical (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Diagnostics (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.UserSecrets (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Json (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.CommandLine (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0-preview.5.24306.7)
.NET 8.0
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.CommandLine (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Json (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventSource (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Options (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Debug (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.UserSecrets (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Diagnostics (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.FileProviders.Physical (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Configuration (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.Console (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.0-preview.5.24306.7)