AzureStorage.Standard.Blobs 1.0.0

dotnet add package AzureStorage.Standard.Blobs --version 1.0.0
                    
NuGet\Install-Package AzureStorage.Standard.Blobs -Version 1.0.0
                    
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="AzureStorage.Standard.Blobs" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AzureStorage.Standard.Blobs" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="AzureStorage.Standard.Blobs" />
                    
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 AzureStorage.Standard.Blobs --version 1.0.0
                    
#r "nuget: AzureStorage.Standard.Blobs, 1.0.0"
                    
#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 AzureStorage.Standard.Blobs@1.0.0
                    
#: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=AzureStorage.Standard.Blobs&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=AzureStorage.Standard.Blobs&version=1.0.0
                    
Install as a Cake Tool

AzureStorage.Standard.Blobs

A simplified, modern .NET client library for Azure Blob Storage with built-in retry policies, comprehensive error handling, and intuitive APIs.

NuGet License: MIT

Features

Simplified API - Easy-to-use wrapper around Azure.Storage.Blobs SDK Built-in Resilience - Automatic retry policies using Polly Comprehensive Operations - Upload, download, delete, copy, and more Streaming Support - Efficient handling of large files Container Management - Full CRUD operations for containers Metadata Management - Easy blob and container metadata handling Access Tier Management - Hot, Cool, and Archive tier support Lease Operations - Blob leasing for distributed locking SAS Token Generation - Secure delegated access Extensive Documentation - Full XML documentation for IntelliSense

Installation

dotnet add package AzureStorage.Standard.Blobs

Or via Package Manager Console:

Install-Package AzureStorage.Standard.Blobs

Quick Start

1. Configure the Client

using AzureStorage.Standard.Blobs;
using AzureStorage.Standard.Core;

var options = new StorageOptions
{
    ConnectionString = "DefaultEndpointsProtocol=https;AccountName=..."
};

var blobClient = new AzureBlobClient(options);

2. Upload a Blob

// Upload from file
await blobClient.UploadBlobAsync(
    containerName: "documents",
    blobName: "report.pdf",
    filePath: "C:\\reports\\report.pdf"
);

// Upload from stream
using var stream = File.OpenRead("image.jpg");
await blobClient.UploadBlobAsync(
    containerName: "images",
    blobName: "profile.jpg",
    content: stream
);

3. Download a Blob

// Download to file
await blobClient.DownloadBlobAsync(
    containerName: "documents",
    blobName: "report.pdf",
    filePath: "C:\\downloads\\report.pdf"
);

// Download to stream
using var downloadStream = await blobClient.DownloadBlobToStreamAsync(
    containerName: "images",
    blobName: "profile.jpg"
);

4. Container Operations

// Create container
await blobClient.CreateContainerIfNotExistsAsync("my-container");

// List containers
var containers = await blobClient.ListContainersAsync();

// Delete container
await blobClient.DeleteContainerAsync("my-container");

5. List Blobs

var blobs = await blobClient.ListBlobsAsync(
    containerName: "documents",
    prefix: "reports/"
);

foreach (var blob in blobs)
{
    Console.WriteLine($"Blob: {blob.Name}, Size: {blob.Size} bytes");
}

Advanced Usage

Metadata Management

// Set blob metadata
var metadata = new Dictionary<string, string>
{
    { "Author", "John Doe" },
    { "Department", "Engineering" }
};
await blobClient.SetBlobMetadataAsync("container", "document.pdf", metadata);

// Get blob metadata
var retrievedMetadata = await blobClient.GetBlobMetadataAsync("container", "document.pdf");

Access Tier Management

// Change blob access tier
await blobClient.SetBlobAccessTierAsync(
    containerName: "archives",
    blobName: "old-data.zip",
    accessTier: AccessTier.Archive
);

Copy Blobs

// Copy blob within storage account
await blobClient.CopyBlobAsync(
    sourceContainerName: "source-container",
    sourceBlobName: "original.pdf",
    destinationContainerName: "backup-container",
    destinationBlobName: "backup-original.pdf"
);

Generate SAS Token

var sasToken = await blobClient.GenerateBlobSasTokenAsync(
    containerName: "documents",
    blobName: "report.pdf",
    permissions: BlobSasPermissions.Read,
    expiresOn: DateTimeOffset.UtcNow.AddHours(2)
);

// Use the SAS token
var sasUrl = $"https://mystorageaccount.blob.core.windows.net/documents/report.pdf?{sasToken}";

Authentication Options

Connection String (Development)

var options = new StorageOptions
{
    ConnectionString = "DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=..."
};

Account Key

var options = new StorageOptions
{
    AccountName = "myaccount",
    AccountKey = "your-account-key"
};

Service URI (Managed Identity)

var options = new StorageOptions
{
    ServiceUri = new Uri("https://myaccount.blob.core.windows.net")
};

Supported Frameworks

  • .NET Standard 2.0
  • .NET Standard 2.1
  • .NET 8.0
  • .NET 9.0

Error Handling

All operations throw AzureStorageException with detailed error information:

try
{
    await blobClient.DownloadBlobAsync("container", "missing-file.pdf", "output.pdf");
}
catch (AzureStorageException ex)
{
    Console.WriteLine($"Error: {ex.Message}");
    Console.WriteLine($"Error Code: {ex.ErrorCode}");
    Console.WriteLine($"Status Code: {ex.StatusCode}");
}

Documentation

For complete documentation, visit the GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues, questions, or suggestions, please open an issue on GitHub.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.0.0 205 10/20/2025
0.0.0-alpha.0.11 114 10/20/2025
0.0.0-alpha.0.10 120 10/20/2025
0.0.0-alpha.0.9 121 10/20/2025
0.0.0-alpha.0.8 120 10/19/2025
0.0.0-alpha.0.7 112 10/19/2025
0.0.0-alpha.0.6 119 10/19/2025
0.0.0-alpha.0.5 118 10/19/2025

Initial release v1.0.0:
- Comprehensive blob operations (upload, download, delete, copy)
- Container management with full CRUD support
- Streaming support for large files
- Metadata and properties management
- Access tier management (Hot, Cool, Archive)
- Blob lease operations
- SAS token generation
- Built-in retry policies using Polly
- Async/await support throughout
- Extensive XML documentation
- Multi-framework support (.NET Standard 2.0+, .NET 7-9)