Open Source · nanoFramework

Familiar .NET patterns,
on embedded hardware.

A library collection for .NET nanoFramework — Generic Host, DI, ASP.NET Core-style WebServer, NeoPixel, and more. From a team member of the nanoFramework project. MIT licensed, on NuGet.


The project

From a nanoFramework team member

.NET nanoFrameworkis an open-source platform that brings C# and .NET development to resource-constrained embedded devices — ESP32, STM32, and more. I'm a team member of the project.

CCSWE.nanoFramework covers what mainline won't take: libraries that are too opinionated, out of scope, or take a different architectural position. When work meets mainline's bar, it goes back upstream. The DhcpServer library I wrote was accepted into the nanoFramework project as a direct replacement for the official implementation — the clearest example of how this two-way relationship works.

The audience is .NET developers who want familiar patterns — Generic Host, DI, MEL logging, ASP.NET Core-style routing — on hardware that can't run the full runtime. If you've written .NET server-side code, this ecosystem will feel like home.

Library collection

Libraries across 4 areas.

Application Infrastructure

Generic Host, DI, MEL logging, and pub/sub messaging — the patterns .NET developers already know, running on a microcontroller.

  • CCSWE.nanoFramework.HostingNuGet downloads

    .NET Generic Host on embedded hardware — DeviceHostBuilder, DI container, hosted services, and startup initializers that can abort before services launch.

  • CCSWE.nanoFramework.ConfigurationNuGet downloads

    Pluggable configuration management — swappable storage backends, change events, and validation. In-memory and file-system backends included.

  • CCSWE.nanoFramework.LoggingNuGet downloads

    MEL-backed logging — ConsoleLogger, configurable log levels, standard ILogger interface.

  • CCSWE.nanoFramework.MediatorNuGet downloads

    Async pub/sub event mediator — DI-registered singleton handlers and runtime-registered transient handlers. Decouples publishers and subscribers cleanly.

Networking & Services

Production networking for embedded devices — a web server, DHCP server, and mDNS responder that hold up in real applications.

  • CCSWE.nanoFramework.WebServerNuGet downloads

    Async web server modelled after ASP.NET Core — attribute-based controllers, routing, parameter binding, custom middleware, pluggable auth, and HTTPS.

  • CCSWE.nanoFramework.DhcpServerAccepted upstreamNuGet downloads

    RFC 2131 DHCP server — full message set, lease renewal and rebinding, captive portal URL, extensible options. Accepted into the nanoFramework project as the official implementation.

  • CCSWE.nanoFramework.MdnsServerNuGet downloads

    mDNS responder with DI support — answers A, PTR, SRV, and TXT queries automatically. Integrated via AddMdnsServer().

Core & Utilities

The foundation everything else is built on — thread-safe collections, threading primitives, argument validation, and a faster Math implementation.

  • CCSWE.nanoFramework.CoreNuGet downloads

    Shared utility classes — Ensure/ThrowHelper for argument validation, StringExtensions, and reflection helpers.

  • CCSWE.nanoFramework.ThreadingNuGet downloads

    Thread management — ThreadPool, ConsumerThreadPool (queue-backed with callback), and multi-handle wait utilities.

  • CCSWE.nanoFramework.Collections.ConcurrentNuGet downloads

    Thread-safe collections — ConcurrentList (thread-safe ArrayList) and ConcurrentQueue.

  • CCSWE.nanoFramework.MathNuGet downloads

    Fast System.Math — strips NaN-handling overhead for speed on constrained hardware. Improvements contributed back to nanoFramework/System.Math.

  • CCSWE.nanoFramework.FileStorageNuGet downloads

    IFileStorage abstraction over the device file system — makes storage access testable and swappable.

  • CCSWE.nanoFramework.Threading.TestFrameworkNuGet downloads

    Test helpers for ThreadPool state management in nanoFramework unit tests.

Flagship

NeoPixel — the LED library it should have been.

The most downloaded library in the collection by a wide margin. The official nanoFramework LED library is slow and feature-limited — this is the replacement. NeoPixel uses ESP32's RMT peripheral for significantly faster output, supports a broader API, and integrates directly with the Graphics library for color conversion and animation utilities.

CCSWE.nanoFramework.NeoPixelNuGet downloadsNuGet downloads for Graphics
Build status MIT License

Browse the libraries on GitHub

All libraries are MIT licensed and available on NuGet. The repo also includes vstest-nanoframework and actions-nanoframework — CI/CD tooling used internally to build and test the collection.

View on GitHub