Microsoft.Extensions.Hosting 11.0.0-preview.1.26104.118
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.HostApplicationBuilderMicrosoft.Extensions.Hosting.HostBuilderMicrosoft.Extensions.Hosting.IHostedServiceMicrosoft.Extensions.Hosting.IHostedLifecycleService
Additional Documentation
- Generic host
- API documentation
Related Packages
Microsoft.Extensions.ConfigurationMicrosoft.Extensions.DependencyInjectionMicrosoft.Extensions.Hosting.AbstractionsMicrosoft.Extensions.LoggingMicrosoft.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 |
|---|---|
|
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/dotnet/tree/b0f34d51fccc69fd334253924abd8d6853fad7aa
|
4 |
|
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/d3aba8fe1a0d0f5c145506f292b72ea9d28406fc
|
4 |
|
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/dotnet/tree/fad253f51b461736dfd3cd9c15977bb7493becef
|
4 |
|
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/68bb6fb08f8f85bb3cf08953a0d2f4a254eaccff
|
3 |
|
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/67acc3d331454956fc06d6de2218a625e3e596f8
|
3 |
|
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/d634f2bd1ad6e319f26ff0f1d7ada5539158a19f
|
3 |
|
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/1dcf7acfacf0fe154adcc23270cb0da11ff44ace
|
3 |
|
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/88ca061d20b28892b28279b17bad46919cff49a4
|
3 |
|
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/54e8b61777d42d2b10744d1987438ee5b8c0b24d
|
3 |
|
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/7c810658463f35c39c54d5fb8a8dbbfd463bf747
|
3 |
|
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/2924ca229b3d6c91b7c9eded119b31dfd7aa1fef
|
3 |
|
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/4e7d976438b0fc17f435804e801d5d68d193ec33
|
3 |
|
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/70048beee894074e9718206a0017d9b080ee66ff
|
3 |
|
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/8486d31e24f30e3fa1809a95699a0adc16f448d7
|
3 |
|
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/3fe12b935c03138f76364dc877a7e069e254b5b2
|
3 |
|
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/b96167fbfe8bd45d94e4dcda42c7d09eb5745459
|
3 |
|
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/c663adee8e64ba5d379fa0edfb8201984a7df7d0
|
3 |
|
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/d5dc8a13cc618b9cbdc1e5744b4806c594d49553
|
3 |
|
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/ed74665e773dd1ebea3289c5662d71c590305932
|
3 |
|
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/0a715692d8e2536c899faa0bb4f0cec2c2e33e36
|
3 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 11.0.0-preview.1.26104.118)
- System.Threading.Tasks.Extensions (>= 4.6.3)
- Microsoft.Extensions.Options (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.EventSource (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.EventLog (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Debug (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Console (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Configuration (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Hosting.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.FileProviders.Physical (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.FileProviders.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Diagnostics (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.DependencyInjection (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.UserSecrets (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.Json (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.FileExtensions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.CommandLine (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.Binder (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.Abstractions (>= 11.0.0-preview.1.26104.118)
.NET Standard 2.0
- Microsoft.Extensions.Logging.Configuration (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Hosting.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.FileProviders.Physical (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.FileProviders.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Diagnostics (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.DependencyInjection (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.UserSecrets (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.Json (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.FileExtensions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.CommandLine (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.Binder (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Bcl.AsyncInterfaces (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Console (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Debug (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.EventSource (>= 11.0.0-preview.1.26104.118)
- System.Threading.Tasks.Extensions (>= 4.6.3)
- Microsoft.Extensions.Options (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.EventLog (>= 11.0.0-preview.1.26104.118)
.NET 11.0
- Microsoft.Extensions.Options (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.EventSource (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.EventLog (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Debug (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Console (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Configuration (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.FileProviders.Physical (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.FileProviders.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Hosting.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.DependencyInjection (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Diagnostics (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.UserSecrets (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.Json (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.FileExtensions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.CommandLine (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.Binder (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.Abstractions (>= 11.0.0-preview.1.26104.118)
.NET Standard 2.1
- Microsoft.Extensions.Options (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.EventSource (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.EventLog (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Debug (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Console (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Configuration (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Hosting.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.FileProviders.Physical (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.FileProviders.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Diagnostics (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.DependencyInjection (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.UserSecrets (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.Json (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.FileExtensions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.CommandLine (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.Binder (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.Abstractions (>= 11.0.0-preview.1.26104.118)
.NET 10.0
- Microsoft.Extensions.Configuration.Binder (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.CommandLine (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.Json (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.FileExtensions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.EventSource (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Options (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Debug (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration.UserSecrets (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Configuration (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.EventLog (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.DependencyInjection (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Diagnostics (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.FileProviders.Physical (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Hosting.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Abstractions (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Configuration (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.Logging.Console (>= 11.0.0-preview.1.26104.118)
- Microsoft.Extensions.FileProviders.Abstractions (>= 11.0.0-preview.1.26104.118)