Ryoken.Extensions.Hosting 1.0.71

dotnet add package Ryoken.Extensions.Hosting --version 1.0.71
                    
NuGet\Install-Package Ryoken.Extensions.Hosting -Version 1.0.71
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ryoken.Extensions.Hosting" Version="1.0.71" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ryoken.Extensions.Hosting" Version="1.0.71" />
                    
Directory.Packages.props
<PackageReference Include="Ryoken.Extensions.Hosting" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ryoken.Extensions.Hosting --version 1.0.71
                    
#r "nuget: Ryoken.Extensions.Hosting, 1.0.71"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ryoken.Extensions.Hosting@1.0.71
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ryoken.Extensions.Hosting&version=1.0.71
                    
Install as a Cake Addin
#tool nuget:?package=Ryoken.Extensions.Hosting&version=1.0.71
                    
Install as a Cake Tool

Ryoken.Extensions.Hosting

.NET NuGet Version

Ever wanted to have a simple Console app that terminates when done, but still has access to DI and all other the benefits of Microsoft.Extensions.Hosting? This library allows you to easily implement a single function and handles the ApplicationLifetime interaction.

Based on https://dfederm.com/building-a-console-app-with-.net-generic-host/

Minimal Example

using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Hosting;

using Ryoken.Extensions.Hosting;

await Host.CreateDefaultBuilder(args)
          .ConfigureServices(services => services.AddConsoleMain<ConsoleMain>())
          .RunConsoleAsync();

class ConsoleMain(ILogger<ConsoleMain> Logger) : IConsoleMain
{
    public async Task ExecuteAsync(CancellationToken token)
    {
        Logger.LogInformation("Hello from ConsoleMain!");
    }
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.71 105 5/19/2026
1.0.66 124 2/6/2026
1.0.64 115 2/1/2026
1.0.61 116 2/1/2026
1.0.59 119 2/1/2026
1.0.57 202 11/25/2025
1.0.55 202 9/23/2025
1.0.54 194 9/23/2025
1.0.53 193 9/23/2025
1.0.51 202 8/12/2025
1.0.48 214 3/12/2025
1.0.46 154 2/26/2025
1.0.45 169 2/21/2025
1.0.44 155 2/21/2025
1.0.42 168 12/20/2024
1.0.40 165 11/21/2024
1.0.39 156 11/21/2024
1.0.37 159 11/15/2024
1.0.35 172 11/12/2024
1.0.33 158 10/29/2024
Loading failed