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
<PackageReference Include="AzureStorage.Standard.Blobs" Version="1.0.0" />
<PackageVersion Include="AzureStorage.Standard.Blobs" Version="1.0.0" />
<PackageReference Include="AzureStorage.Standard.Blobs" />
paket add AzureStorage.Standard.Blobs --version 1.0.0
#r "nuget: AzureStorage.Standard.Blobs, 1.0.0"
#:package AzureStorage.Standard.Blobs@1.0.0
#addin nuget:?package=AzureStorage.Standard.Blobs&version=1.0.0
#tool nuget:?package=AzureStorage.Standard.Blobs&version=1.0.0
AzureStorage.Standard.Blobs
A simplified, modern .NET client library for Azure Blob Storage with built-in retry policies, comprehensive error handling, and intuitive APIs.
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}");
}
Related Packages
- AzureStorage.Standard.Tables - Azure Table Storage client
- AzureStorage.Standard.Queues - Azure Queue Storage client
- AzureStorage.Standard.Files - Azure File Share client
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 | Versions 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. |
-
.NETStandard 2.1
- Azure.Storage.Blobs (>= 12.26.0)
- AzureStorage.Standard.Core (>= 1.0.0)
- Polly (>= 8.5.0)
-
net8.0
- Azure.Storage.Blobs (>= 12.26.0)
- AzureStorage.Standard.Core (>= 1.0.0)
- Polly (>= 8.5.0)
-
net9.0
- Azure.Storage.Blobs (>= 12.26.0)
- AzureStorage.Standard.Core (>= 1.0.0)
- Polly (>= 8.5.0)
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)