Nano.Storage 10.0.0-preview1

This is a prerelease version of Nano.Storage.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Nano.Storage --version 10.0.0-preview1
                    
NuGet\Install-Package Nano.Storage -Version 10.0.0-preview1
                    
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="Nano.Storage" Version="10.0.0-preview1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nano.Storage" Version="10.0.0-preview1" />
                    
Directory.Packages.props
<PackageReference Include="Nano.Storage" />
                    
Project file
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 Nano.Storage --version 10.0.0-preview1
                    
#r "nuget: Nano.Storage, 10.0.0-preview1"
                    
#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 Nano.Storage@10.0.0-preview1
                    
#: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=Nano.Storage&version=10.0.0-preview1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Nano.Storage&version=10.0.0-preview1&prerelease
                    
Install as a Cake Tool

Nano.Storage

Build and Deploy NuGet NuGet

Storage provider common implementations for Nano applications.

⚠️ This NuGet is transitive and included in other Nano Packages, and is not meant to be included directly.


Table of Contents

Summary

Add a flexible, provider-agnostic file storage layer to your Nano applications.

To connect a filshare, register an IStorageProvider. Each provider handles its own setup, connectivity, and optional health checks, while Nano exposes a consistent interface to your application.

Once a storage provider is registered, Nano automatically registers an IPathProvider, which can be injected anywhere in your application. This gives easy access to the storage root fileshare directory as well as the temporary (tmp) directory.

Registration

To use Nano.Storage, register a storage provider as a service dependency in your application.
Use the AddNanoStorage<TProvider>() extension method, where TProvider is your chosen IStorageProvider implementation:

...
.ConfigureServices(services =>
{
    services
        .AddNanoStorage<TProvider>();
})
...

In addition to registering storage, map a local folder to a container path in in your docker-compose.yml so the container can access the storage directory.

services:
  {service-name}:
    volumes:
      - ./bin/{share-name}:/mnt/{share-name}

When deploying Nano applications to Kubernetes, ensure your deployment.yaml or cronjob.yaml, depending on the application type, maps the shared storage directory and a secret is created for the storage account. The exact configuration depends on the storage provider. See supported Storage Providers for details.

⚠️ Optionally, map a writable tmp directory for temporary files.
This allows the main container to remain immutable while supporting temporary data.

spec:
  template:
    spec:
      containers:
        volumeMounts:
        - name: tmp
          mountPath: /tmp
      volumes:
      - name: tmp
        emptyDir: {}

Last, the build-and-deploy needs to have additional environmental variables defined used by the storage provider. Again exactly what variables depends on the specific storage provider. See supported Storage Providers for details.

Configuration

The Storage section in the configuration defines the storage provider and related settings used by the application.

Setting Type Default Description
ShareName string null The logical container, share, or bucket name used for file storage.
Credentials object null Optional. The credential or account of the storage provider.
Credentials.Id string null Required. The account id, username or tenant identifier used to authenticate with the storage provider.
Credentials.Secret string null Required. The password, secret, key, password or credential used to authenticate with the storage provider.
HealthCheck object null Storage health check. Only relevant for NanoApiApplication and NanoWebApplication..
"Storage": {
  "ShareName": null,
  "Credentials": {
    "Id": null,
    "Secret": null
  },
  "HealthCheck": null
}

📖 Learn more about Application Configuration here.

Health Checks

When health checks are enabled in the storage configuration, Nano automatically registers a health check for the configured storage provider.

This allows the application to verify that the underlying storage fileshare connection is available and operational. The health check integrates with ASP.NET Core's health check system and can be used by monitoring tools, load balancers, or container orchestrators to determine the health status of the application.

Setting Type Default Description
HealthCheck.UnhealthyStatus enum Unhealthy The health status reported when the storage provider is unavailable. Only relevant for NanoApiApplication and NanoWebApplication.
"Storage": {
  "HealthCheck": {
    "UnhealthyStatus": "Unhealthy"
  }
}

⚠️ In order for storage healthcheck to take effect, healthchecks must be enabled for the application. Read more about Nano Health Check.

Storage Providers

Nano provides several storage providers, so usually there is no need to implement a custom provider for your application.

Storagae providers implements the interface IStorageProvider. It contains a single method Configure(...), that is responsible for handling any configuration and setup required for the storage provider.

To create a new storage provider, implement the IStorageProvider interface. Make sure to register all required services in the Configure(...) method, and then register your provider with the application using .AddNanoStorage<TProvider>().

The following storage providers are currently supported in Nano.

Product 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.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Nano.Storage:

Package Downloads
Nano.Storage.Azure

This package is part of the Nano Library, a set of reusable .NET libraries for building microservice applications. Nano addresses common non-business concerns such as logging, persistence, messaging, validation, and documentation, while remaining fully configurable and extensible, so applications can stay focused on business logic. See https://github.com/Nano-Core/Nano.Library for details.

Nano.Storage.Local

This package is part of the Nano Library, a set of reusable .NET libraries for building microservice applications. Nano addresses common non-business concerns such as logging, persistence, messaging, validation, and documentation, while remaining fully configurable and extensible, so applications can stay focused on business logic. See https://github.com/Nano-Core/Nano.Library for details.

Nano.All

This package is part of the Nano Library, a set of reusable .NET libraries for building microservice applications. Nano addresses common non-business concerns such as logging, persistence, messaging, validation, and documentation, while remaining fully configurable and extensible, so applications can stay focused on business logic. See https://github.com/Nano-Core/Nano.Library for details.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.6 104 8/16/2026
10.0.5 139 8/7/2026
10.0.4 147 8/5/2026
10.0.3 156 8/4/2026
10.0.2 158 8/2/2026
10.0.1 148 8/2/2026
10.0.0 151 7/19/2026
10.0.0-rc5 146 7/15/2026
10.0.0-rc4 162 7/13/2026
10.0.0-rc3 302 7/9/2026
10.0.0-rc2 152 7/8/2026
10.0.0-rc1 253 6/4/2026
10.0.0-preview2 147 4/25/2026
10.0.0-preview1 139 4/24/2026

- .NET 10 support.
- Comprehensive rewrite with performance optimizations, improvements, and bug fixes.
- Not compatible with previous versions of Nano.