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 |
---|---|
Aiursoft.DbTools
A tool for database.
|
317 |
Aiursoft.DbTools
A tool for database.
|
227 |
Aiursoft.DbTools
A tool for database.
|
200 |
Aiursoft.CommandFramework
Aiursoft CommandFramework is a framework for building command line tools.
|
194 |
Aiursoft.CommandFramework
Aiursoft CommandFramework is a framework for building command line tools.
|
165 |
Aiursoft.DbTools
A tool for database.
|
154 |
Aiursoft.DbTools
A tool for database.
|
147 |
Aiursoft.DbTools
A tool for database.
|
135 |
Aiursoft.CommandFramework
Aiursoft CommandFramework is a framework for building command line tools.
|
110 |
Aiursoft.DbTools
A tool for database.
|
81 |
Aiursoft.DbTools
A tool for database.
|
65 |
Microsoft.Identity.Web
This package enables ASP.NET Core web apps and web APIs to use the Microsoft identity platform (formerly Azure AD v2.0).
This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
|
62 |
Aiursoft.DbTools
A tool for database.
|
60 |
Microsoft.Identity.Web
This package enables ASP.NET Core web apps and web APIs to use the Microsoft identity platform (formerly Azure AD v2.0).
This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
|
59 |
Aiursoft.DbTools
A tool for database.
|
58 |
Aiursoft.DbTools
A tool for database.
|
52 |
Microsoft.Identity.Web
This package enables ASP.NET Core web apps and web APIs to use the Microsoft identity platform (formerly Azure AD v2.0).
This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
|
46 |
Microsoft.Identity.Web
This package enables ASP.NET Core web apps and web APIs to use the Microsoft identity platform (formerly Azure AD v2.0).
This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
|
45 |
Aiursoft.CommandFramework
Aiursoft CommandFramework is a framework for building command line tools.
|
40 |
Microsoft.Identity.Web
This package enables ASP.NET Core web apps and web APIs to use the Microsoft identity platform (formerly Azure AD v2.0).
This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
|
40 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.CommandLine (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Json (>= 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.DependencyInjection.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.FileProviders.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.Logging.Debug (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventSource (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Options (>= 9.0.0-preview.5.24306.7)
- System.Threading.Tasks.Extensions (>= 4.5.4)
.NET 8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.CommandLine (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Json (>= 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.DependencyInjection.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.FileProviders.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.Logging.Debug (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventSource (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Options (>= 9.0.0-preview.5.24306.7)
.NET 9.0
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.CommandLine (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Json (>= 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.DependencyInjection.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.FileProviders.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.Logging.Debug (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventSource (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Options (>= 9.0.0-preview.5.24306.7)
.NET Standard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.CommandLine (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Json (>= 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.DependencyInjection.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.FileProviders.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.Logging.Debug (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventSource (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Options (>= 9.0.0-preview.5.24306.7)
- System.Threading.Tasks.Extensions (>= 4.5.4)
.NET Standard 2.1
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.CommandLine (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Configuration.Json (>= 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.DependencyInjection.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.FileProviders.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.Logging.Debug (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventLog (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging.EventSource (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Logging (>= 9.0.0-preview.5.24306.7)
- Microsoft.Extensions.Options (>= 9.0.0-preview.5.24306.7)