Nano.Storage.Azure
10.0.0-preview1
See the version list below for details.
dotnet add package Nano.Storage.Azure --version 10.0.0-preview1
NuGet\Install-Package Nano.Storage.Azure -Version 10.0.0-preview1
<PackageReference Include="Nano.Storage.Azure" Version="10.0.0-preview1" />
<PackageVersion Include="Nano.Storage.Azure" Version="10.0.0-preview1" />
<PackageReference Include="Nano.Storage.Azure" />
paket add Nano.Storage.Azure --version 10.0.0-preview1
#r "nuget: Nano.Storage.Azure, 10.0.0-preview1"
#:package Nano.Storage.Azure@10.0.0-preview1
#addin nuget:?package=Nano.Storage.Azure&version=10.0.0-preview1&prerelease
#tool nuget:?package=Nano.Storage.Azure&version=10.0.0-preview1&prerelease
Nano.Storage.Azure
Azure file share storage for Nano applications._
Table of Contents
Summary
Storage Provider implementation for Microsoft Azure File Shares.
A file share from an Azure Storage Account can be mounted into your container, allowing your Nano application to access it as if it were a local drive. This approach enables your application to read from and write to the storage directly, while the underlying Azure file share handles persistence and centralized storage.
No changes to your application code are required and you can interact with the file share using the IPathProvider interface.
📖 Learn more about Nano Storage. 📖 Learn more about Nano Azure File Share.
Try it out yourself using the Api.Storage.Azure or Console.Storage.Azure example.
Registration
Install the Nano.Storage.Azure NuGet package.
dotnet add package Nano.Storage.Azure;
Register the AzureFileshareProvider provider during application startup in the ConfigureServices(...) method.
...
.ConfigureServices(services =>
{
services
.AddNanoStorage<AzureFileshareProvider>();
})
...
Configuration
Add the storage configuration.
"Storage": {
"ShareName": null,
"Credentials": {
"Id": null,
"Secret": null
},
"HealthCheck": {
"UnhealthyStatus": "Unhealthy"
}
}
Docker Compose
In addition to registering and configuring storage, map a local folder to a container path in in your docker-compose.yml so the container can access the storage directory.
services:
{my.service}:
volumes:
- {share-name}:/mnt/{share-name}
Kubernetes
Next, the following to your Kubernetes deployment.yaml or cronjob.yaml (depending on application type) for the Nano application.
You also need to map the storage-account-secret that is created alongside the Nano Azure Storage Account
in the deployment.yaml for fileshare authentication.
spec:
template:
spec:
containers:
env:
- name: Storage__Account__Id
valueFrom:
secretKeyRef:
name: storage-account-secret
key: azurestorageaccountname
- name: Storage__Account__Secret
valueFrom:
secretKeyRef:
name: storage-account-secret
key: azurestorageaccountkey
volumeMounts:
- name: tmp
mountPath: /tmp
- name: %SERVICE_NAME%-volume
mountPath: /mnt/%STORAGE_SHARE_NAME%
volumes:
- name: tmp
emptyDir: {}
- name: %SERVICE_NAME%-volume
azureFile:
secretName: storage-account-secret
shareName: %STORAGE_SHARE_NAME%
readOnly: false
⚠️ The
storage-account-secretsecret will be reused for all applications using Azure Fileshare as storage provider.
That makes it easy to change the secret values later on when needed, and just requires the secret values to be updated and re-deployed.
GitHub Actions
Last, the build-and-deploy.yaml needs a few additional environmental variables related to Azure storage provder.
env:
STORAGE_SHARE_NAME: {share-name}
STORAGE_CREDENTIALS_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_STORAGE_CREDENTIALS_ID || secrets.STAGING_STORAGE_CREDENTIALS_ID }}
STORAGE_CREDENTIALS_SECRET: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_STORAGE_CREDENTIALS_SECRET || secrets.STAGING_STORAGE_CREDENTIALS_SECRET }}
STORAGE_SIZE: 1000
Also, the Azure fileshare needs to be created during deployment if it does not already exist. Add the following step to the build-and-deploy.yaml.
- name: Create Fileshare
shell: pwsh
run: |
$env:EXISTING_FILE_SHARE = sudo az storage share list --account-name $env:STORAGE_CREDENTIALS_ID --account-key $env:STORAGE_CREDENTIALS_SECRET --query "[?contains(name, '$env:STORAGE_SHARE_NAME')].[name]" -o tsv;
if ([string]::IsNullOrEmpty($env:EXISTING_FILE_SHARE))
{
sudo az storage share create -n $env:STORAGE_SHARE_NAME --account-name $env:STORAGE_CREDENTIALS_ID --account-key $env:STORAGE_CREDENTIALS_SECRET --quota $env:STORAGE_SIZE;
if ($LastExitCode -ne 0)
{
throw "error";
};
}
| 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. |
-
net10.0
- Azure.Storage.Files.Shares (>= 12.25.0)
- Nano.Storage (>= 10.0.0-preview1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Nano.Storage.Azure:
| Package | Downloads |
|---|---|
|
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.0-preview2 | 67 | 4/25/2026 |
| 10.0.0-preview1 | 69 | 4/24/2026 |
- .NET 10 support.
- Comprehensive rewrite with performance optimizations, improvements, and bug fixes.
- Not compatible with previous versions of Nano.