NexusLabs.Needlr.Hosting
0.0.2-alpha-0064
This is a prerelease version of NexusLabs.Needlr.Hosting.
dotnet add package NexusLabs.Needlr.Hosting --version 0.0.2-alpha-0064
NuGet\Install-Package NexusLabs.Needlr.Hosting -Version 0.0.2-alpha-0064
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="NexusLabs.Needlr.Hosting" Version="0.0.2-alpha-0064" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NexusLabs.Needlr.Hosting" Version="0.0.2-alpha-0064" />
<PackageReference Include="NexusLabs.Needlr.Hosting" />
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 NexusLabs.Needlr.Hosting --version 0.0.2-alpha-0064
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NexusLabs.Needlr.Hosting, 0.0.2-alpha-0064"
#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 NexusLabs.Needlr.Hosting@0.0.2-alpha-0064
#: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=NexusLabs.Needlr.Hosting&version=0.0.2-alpha-0064&prerelease
#tool nuget:?package=NexusLabs.Needlr.Hosting&version=0.0.2-alpha-0064&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NexusLabs.Needlr.Hosting
Generic Host support for Needlr - enables auto-discovery and plugin system for worker services and console applications.
Quick Start
Option 1: Needlr Controls the Host
using NexusLabs.Needlr.Hosting;
using NexusLabs.Needlr.Injection;
var host = new Syringe()
.ForHost()
.UsingOptions(() => CreateHostOptions.Default
.UsingArgs(args)
.UsingApplicationName("MyWorkerService"))
.BuildHost();
await host.RunAsync();
Option 2: User Controls the Builder
using Microsoft.Extensions.Hosting;
using NexusLabs.Needlr.Hosting;
using NexusLabs.Needlr.Injection;
var builder = Host.CreateApplicationBuilder(args);
// Your own configuration
builder.Services.AddMyServices();
// Add Needlr discovery
builder.UseNeedlrDiscovery();
var host = builder.Build();
// Optionally run IHostPlugin plugins
host.RunHostPlugins();
await host.RunAsync();
Plugin Interfaces
IHostApplicationBuilderPlugin
Runs during builder configuration (before Build()):
public sealed class MyBuilderPlugin : IHostApplicationBuilderPlugin
{
public void Configure(HostApplicationBuilderPluginOptions options)
{
options.Builder.Services.AddSingleton<IMyService, MyService>();
}
}
IHostPlugin
Runs after Build() but before Run():
public sealed class MyHostPlugin : IHostPlugin
{
public void Configure(HostPluginOptions options)
{
var service = options.Host.Services.GetRequiredService<IMyService>();
service.Initialize();
}
}
Key Features
ForHost()- Transitions Syringe to host mode, Needlr controls lifecycleUseNeedlrDiscovery()- Integrates discovery into user-controlled buildersIHostedServiceauto-discovery - Background services registered automatically- Full parity between reflection and source-gen modes
Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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.
-
net10.0
- Microsoft.Extensions.Configuration (>= 10.0.3)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.3)
- Microsoft.Extensions.Hosting (>= 10.0.3)
- Microsoft.Extensions.Logging (>= 10.0.3)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.3)
- Microsoft.Extensions.Logging.Console (>= 10.0.3)
- NexusLabs.Needlr (>= 0.0.2-alpha-0064)
- NexusLabs.Needlr.Injection (>= 0.0.2-alpha-0064)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on NexusLabs.Needlr.Hosting:
| Package | Downloads |
|---|---|
|
NexusLabs.Needlr.AspNet
Package Description |
|
|
NexusLabs.Needlr.Serilog
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.2-alpha-0064 | 79 | 6/17/2026 |
| 0.0.2-alpha-0063 | 296 | 6/16/2026 |
| 0.0.2-alpha-0062 | 125 | 6/14/2026 |
| 0.0.2-alpha-0061 | 261 | 6/9/2026 |
| 0.0.2-alpha-0060 | 167 | 6/8/2026 |
| 0.0.2-alpha-0059 | 610 | 5/12/2026 |
| 0.0.2-alpha-0058 | 191 | 5/11/2026 |
| 0.0.2-alpha-0057 | 199 | 5/10/2026 |
| 0.0.2-alpha-0056 | 190 | 5/7/2026 |
| 0.0.2-alpha-0055 | 191 | 5/7/2026 |
| 0.0.2-alpha-0054 | 197 | 5/7/2026 |
| 0.0.2-alpha-0053 | 180 | 5/6/2026 |
| 0.0.2-alpha-0052 | 189 | 5/6/2026 |
| 0.0.2-alpha-0051 | 215 | 5/4/2026 |
| 0.0.2-alpha-0050 | 190 | 5/2/2026 |
| 0.0.2-alpha-0049 | 192 | 5/2/2026 |
| 0.0.2-alpha-0048 | 164 | 5/1/2026 |
| 0.0.2-alpha-0047 | 230 | 4/25/2026 |
| 0.0.2-alpha-0046 | 168 | 4/20/2026 |
Loading failed