CCSWE.nanoFramework.Hosting
1.1.129
dotnet add package CCSWE.nanoFramework.Hosting --version 1.1.129
NuGet\Install-Package CCSWE.nanoFramework.Hosting -Version 1.1.129
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="CCSWE.nanoFramework.Hosting" Version="1.1.129" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CCSWE.nanoFramework.Hosting" Version="1.1.129" />
<PackageReference Include="CCSWE.nanoFramework.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 CCSWE.nanoFramework.Hosting --version 1.1.129
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CCSWE.nanoFramework.Hosting, 1.1.129"
#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 CCSWE.nanoFramework.Hosting@1.1.129
#: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=CCSWE.nanoFramework.Hosting&version=1.1.129
#tool nuget:?package=CCSWE.nanoFramework.Hosting&version=1.1.129
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CCSWE.nanoFramework.Hosting
Hosting and startup infrastructure for nanoFramework applications, modelled after the .NET Generic Host. Provides a structured way to wire up dependency injection, run initialization logic, and start long-running background services.
Startup sequence
- Services are registered via
ConfigureServices IDeviceInitializerimplementations run in registration order — if any returnsfalse, startup is abortedIHostedService.StartAsyncis called for each registered hosted service
API
DeviceHost
Static factory with a single entry point:
DeviceHost.CreateDefaultBuilder()
.ConfigureServices((context, services) =>
{
services.AddSingleton(typeof(IDeviceInitializer), typeof(MyInitializer));
services.AddHostedService(typeof(MyService));
})
.Build()
.Run();
IDeviceInitializer
Implement to run initialization logic before hosted services start:
public class MyInitializer : IDeviceInitializer
{
public bool Initialize()
{
// return false to abort startup
return true;
}
}
IHostedService
Standard nanoFramework hosting interface for long-running background work. Register via services.AddHostedService(typeof(MyService)).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NETnanoFramework | netnano1.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETnanoFramework 1.0
- CCSWE.nanoFramework.Core (>= 1.1.129)
- CCSWE.nanoFramework.Logging (>= 1.1.129)
- nanoFramework.CoreLibrary (>= 1.17.11)
- nanoFramework.DependencyInjection (>= 1.1.32)
- nanoFramework.Hosting (>= 2.0.11)
- nanoFramework.Logging (>= 1.1.161)
- nanoFramework.System.Collections (>= 1.5.67)
- nanoFramework.System.Text (>= 1.3.42)
- nanoFramework.System.Threading (>= 1.1.52)
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.1.129 | 103 | 4/23/2026 |
| 1.1.128 | 97 | 4/23/2026 |
| 1.1.127 | 110 | 4/15/2026 |
| 1.1.124 | 101 | 4/15/2026 |
| 1.1.123 | 97 | 4/14/2026 |
| 1.1.122 | 97 | 4/13/2026 |
| 1.1.117 | 92 | 4/13/2026 |
| 1.1.114 | 99 | 4/10/2026 |
| 1.1.113 | 90 | 4/10/2026 |
| 1.1.112 | 100 | 4/9/2026 |
| 1.1.104 | 89 | 4/8/2026 |
| 1.1.103 | 97 | 4/8/2026 |
| 1.1.101 | 86 | 4/7/2026 |
| 1.1.100 | 86 | 4/7/2026 |
| 1.1.99 | 88 | 4/7/2026 |
| 1.1.97 | 126 | 4/2/2026 |
Loading failed