What Is H.Necessaire, and Which Packages Do You Need?

A map of the H.Necessaire package family: core, runtime, host integrations and storage providers.

Applies to H.Necessaire 4.0.5.

H.Necessaire is a .NET library for rapid application development. It started as a bag of everyday helpers (result types, retry logic, collection extensions) and grew into a layered toolkit: a dependency-injection-friendly core, a runtime with logging, security, sync and background-work building blocks, integrations for .NET hosting and ASP.NET Core, and pluggable storage providers.

You can use just the bottom layer as a utility library, or stack the upper layers into a complete app backbone. This article maps the packages so you know what to install.

The layers

Your app
  |
  +-- UI / host integrations   Integration.AspNetCore, Integration.BlazorWasm, Runtime.UI.Razor,
  |                            Runtime.MAUI, CLI + Runtime.CLI
  +-- Storage providers        Runtime.Sqlite, Runtime.SqlServer, Runtime.RavenDB,
  |                            Runtime.Azure.CosmosDB, Runtime.Google.FirestoreDB
  +-- Runtime (RAD core)       H.Necessaire.Runtime  (+ Integration.DotNet)
  +-- Core                     H.Necessaire, H.Necessaire.Serialization

Package map

PackageWhat it gives youTargets
H.NecessaireThe core: models (OperationResult, Note, paging and sorting filters), extensions, operations (Debouncer, HSafe, logging, caching, QD actions, sync contracts) and the IoC registry.netstandard2.0
H.Necessaire.SerializationData serialization API used by the runtime.netstandard2.0
H.Necessaire.RuntimeThe RAD core framework: security, sync, validation, analytics, HTTP services, daemons, QD action processors and the wireup API.netstandard2.0
H.Necessaire.Runtime.Integration.DotNetBridges to Microsoft.Extensions: configuration provider, ILogger provider and hosted-service daemons.netstandard2.0
H.Necessaire.Runtime.Integration.AspNetCoreASP.NET Core wireup, controllers and middleware.net11.0
H.Necessaire.Runtime.Integration.BlazorWasmBlazor WebAssembly integration.netstandard2.0
H.Necessaire.Runtime.UI.RazorRazor UI building blocks.net11.0
H.Necessaire.Runtime.MAUI.NET MAUI building blocks.net11.0 (android, ios, maccatalyst)
H.Necessaire.DapperData access layer API built on Dapper.netstandard2.0
H.Necessaire.Runtime.SqliteRuntime storage on SQLite.net11.0
H.Necessaire.Runtime.SqlServerRuntime storage on SQL Server.netstandard2.0
H.Necessaire.RavenDB / H.Necessaire.Runtime.RavenDBRavenDB data access API and runtime storage.netstandard2.0
H.Necessaire.Runtime.Azure.CosmosDBRuntime storage on Azure Cosmos DB.netstandard2.0
H.Necessaire.Runtime.Google.FirestoreDBRuntime storage on Google Firestore.netstandard2.1
H.Necessaire.NotificationConcrete implementations for the notifications API.netstandard2.0
H.Necessaire.WebHooks, H.Necessaire.WebSocketsWeb hooks server API; WebSockets server API.netstandard2.0
H.Necessaire.CLI, H.Necessaire.Runtime.CLICommand line app tooling and the CLI runtime.net11.0; netstandard2.0

All packages are versioned together; at the time of writing they are all at 4.0.5.

Which ones do I need?

  • Just the utilities (results, retries, debounce/throttle, extensions): H.Necessaire only.
  • A console or worker app with logging, config and background work: add H.Necessaire.Runtime and H.Necessaire.Runtime.Integration.DotNet.
  • A web app: add H.Necessaire.Runtime.Integration.AspNetCore (and Runtime.UI.Razor for the Razor UI blocks).
  • Persistence: add exactly one storage provider that matches your database.

Where to go next

Start with the getting started article for the IoC registry and wireup, then the configuration reference. The remaining articles in this series cover results and safe execution, debouncing and throttling, QD actions, logging and storage.