NexusLabs.Needlr.Hosting
0.0.2
dotnet add package NexusLabs.Needlr.Hosting --version 0.0.2
NuGet\Install-Package NexusLabs.Needlr.Hosting -Version 0.0.2
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" />
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" />
<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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NexusLabs.Needlr.Hosting, 0.0.2"
#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
#: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
#tool nuget:?package=NexusLabs.Needlr.Hosting&version=0.0.2
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)
- NexusLabs.Needlr.Injection (>= 0.0.2)
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 | 310 | 4/25/2026 |
| 0.0.2-alpha-0059 | 184 | 5/12/2026 |
| 0.0.2-alpha-0058 | 181 | 5/11/2026 |
| 0.0.2-alpha-0057 | 193 | 5/10/2026 |
| 0.0.2-alpha-0056 | 186 | 5/7/2026 |
| 0.0.2-alpha-0055 | 186 | 5/7/2026 |
| 0.0.2-alpha-0054 | 189 | 5/7/2026 |
| 0.0.2-alpha-0053 | 174 | 5/6/2026 |
| 0.0.2-alpha-0052 | 183 | 5/6/2026 |
| 0.0.2-alpha-0051 | 181 | 5/4/2026 |
| 0.0.2-alpha-0050 | 184 | 5/2/2026 |
| 0.0.2-alpha-0049 | 184 | 5/2/2026 |
| 0.0.2-alpha-0048 | 159 | 5/1/2026 |
| 0.0.2-alpha-0047 | 207 | 4/25/2026 |
| 0.0.2-alpha-0046 | 160 | 4/20/2026 |
| 0.0.2-alpha-0045 | 159 | 4/19/2026 |
| 0.0.2-alpha-0044 | 159 | 4/19/2026 |
| 0.0.2-alpha-0043 | 163 | 4/19/2026 |
| 0.0.2-alpha-0042 | 246 | 4/19/2026 |
| 0.0.2-alpha-0041 | 171 | 4/18/2026 |
Loading failed