FluentAzure 0.2.0-rc.5
This is a prerelease version of FluentAzure.
dotnet add package FluentAzure --version 0.2.0-rc.5
NuGet\Install-Package FluentAzure -Version 0.2.0-rc.5
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="FluentAzure" Version="0.2.0-rc.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FluentAzure" Version="0.2.0-rc.5" />
<PackageReference Include="FluentAzure" />
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 FluentAzure --version 0.2.0-rc.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FluentAzure, 0.2.0-rc.5"
#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 FluentAzure@0.2.0-rc.5
#: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=FluentAzure&version=0.2.0-rc.5&prerelease
#tool nuget:?package=FluentAzure&version=0.2.0-rc.5&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FluentAzure
A fluent, functional, and type-safe NuGet package for Azure configuration and secrets management.
🎯 Problem This Solves
Azure developers constantly struggle with:
- Multiple configuration sources (Environment variables, Key Vault, App Configuration, JSON files)
- Complex error handling when secrets are missing or invalid
- No type safety in configuration access
- Imperative, verbose code for simple configuration scenarios
- Poor testing experience for configuration-dependent code
🚀 Solution: Functional Configuration Pipeline
Instead of this imperative mess:
// Traditional approach - verbose and error-prone
var builder = new ConfigurationBuilder();
builder.AddEnvironmentVariables();
builder.AddAzureKeyVault(vaultUrl);
var config = builder.Build();
var connectionString = config["ConnectionString"];
if (string.IsNullOrEmpty(connectionString))
{
throw new InvalidOperationException("ConnectionString is required");
}
var timeout = int.Parse(config["Timeout"] ?? "30");
// ... more boilerplate
Write this ultra-clean pipeline:
// FluentAzure approach - ultra clean and safe
using FluentAzure; // Single using statement!
var config = await FluentConfig
.Create() // Ultra clean - just FluentConfig.Create()!
.FromEnvironment()
.FromKeyVault("https://myvault.vault.azure.net")
.Required("ConnectionString")
.Optional("Timeout", 30)
.Validate(c => c.ConnectionString.StartsWith("Server="))
.BuildAsync()
.Match(
success => success,
errors => throw new ConfigurationException(errors)
);
📦 Installation
dotnet add package FluentAzure
Or add to your .csproj:
<PackageReference Include="FluentAzure" Version="0.2.0-rc.5" />
🔢 Version Information
You can access the current version programmatically:
using FluentAzure;
// Get the current version
string version = FluentConfig.CurrentVersion; // "0.2.0-rc.5"
// Or access version details directly
int major = FluentAzure.Version.Major; // 0
int minor = FluentAzure.Version.Minor; // 2
int patch = FluentAzure.Version.Patch; // 0
bool isPreRelease = FluentAzure.Version.IsPreRelease; // true
📖 Example Usage Patterns
Ultra Clean Configuration (Recommended)
using FluentAzure; // Single using statement!
var config = await FluentConfig
.Create() // Ultra clean - just FluentConfig.Create()!
.FromEnvironment()
.Required("DATABASE_URL")
.Optional("CACHE_TTL", "300")
.BuildAsync();
Complex Enterprise Setup
using FluentAzure; // Single using statement!
var config = await FluentConfig
.Create() // Ultra clean - just FluentConfig.Create()!
.FromJsonFile("appsettings.json")
.FromEnvironment()
.FromKeyVault("https://company-prod-kv.vault.azure.net")
.Transform("ConnectionString", DecryptConnectionString)
.Validate(c => Uri.IsWellFormedUriString(c.ServiceUrl, UriKind.Absolute))
.Bind<AppConfiguration>()
.BuildAsync();
Dependency Injection
// Program.cs
using FluentAzure;
builder.Services.AddFluentAzure<AppSettings>(config => config
.FromEnvironment()
.FromKeyVault(builder.Configuration["KeyVault:Url"]) // or any other sources
);
// Controller
public class ApiController : ControllerBase
{
private readonly AppSettings _settings;
public ApiController(AppSettings settings)
{
_settings = settings;
}
}
Web API Example
// Program.cs
using FluentAzure;
var configResult = await FluentConfig
.Create() // Ultra clean - just FluentConfig.Create()!
.FromJsonFile("appsettings.json")
.FromEnvironment()
.FromKeyVault(builder.Configuration["KeyVault:Url"])
.Required("ConnectionStrings:DefaultConnection")
.Required("Jwt:SecretKey")
.Optional("Logging:LogLevel:Default", "Information")
.BuildAsync()
.Bind<WebApiConfiguration>();
var config = configResult.Match(
success => { builder.Services.AddSingleton(success); return success; },
errors => throw new InvalidOperationException($"Configuration failed: {string.Join(", ", errors)}")
);
🚀 Getting Started
Prerequisites
- .NET 8.0 SDK
- Azure subscription (for Key Vault/App Configuration)
Quick Start
- Install the package:
dotnet add package FluentAzure - Add using statement:
using FluentAzure;(that's it!) - Use the fluent API:
FluentConfig.Create()(ultra clean) - Handle results with the
Matchmethod for type-safe error handling
Features
- Ultra Clean API: Use
FluentConfig.Create()directly with justusing FluentAzure; - Fluent API: Chain configuration sources with readable syntax
- Type Safety: Compile-time validation and runtime error handling
- Multiple Sources: Environment variables, Key Vault, JSON files, and more
- Dependency Injection: Seamless integration with .NET DI container
- Performance: Intelligent caching and lazy loading
🔄 API Comparison
Ultra Clean (Recommended)
using FluentAzure;
var config = await FluentConfig.Create()...
Legacy (Deprecated)
using FluentAzure.Core;
var config = await FluentAzure.Configuration()...
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details on:
- Code style and standards
- Testing requirements
- Pull request process
- Development setup
📚 Resources
Ready to revolutionize Azure configuration management? Let's build something awesome! 🚀
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Azure.Data.AppConfiguration (>= 1.4.1)
- Azure.Extensions.AspNetCore.Configuration.Secrets (>= 1.3.2)
- Azure.Identity (>= 1.14.1)
- Azure.Security.KeyVault.Secrets (>= 4.6.0)
- Microsoft.Extensions.Caching.Memory (>= 9.0.0)
- Microsoft.Extensions.Configuration (>= 9.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0)
- Microsoft.Extensions.Hosting (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Polly (>= 8.2.0)
- System.Text.Json (>= 9.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on FluentAzure:
| Package | Downloads |
|---|---|
|
AzureFunctions.Example
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.0-rc.5 | 132 | 7/11/2025 |
| 0.2.0-rc.4 | 109 | 7/11/2025 |
| 0.2.0-rc.3 | 106 | 7/11/2025 |
| 0.2.0-rc.1 | 160 | 7/8/2025 |
| 0.1.0-alpha.10 | 159 | 7/8/2025 |
| 0.1.0-alpha.9 | 372 | 7/8/2025 |
| 0.1.0-alpha.8 | 156 | 7/8/2025 |
| 0.1.0-alpha.6 | 167 | 7/8/2025 |
| 0.1.0-alpha.5 | 368 | 7/8/2025 |
| 0.1.0-alpha.4 | 160 | 7/8/2025 |
| 0.1.0-alpha.3 | 359 | 7/8/2025 |
| 0.1.0-alpha.2 | 374 | 7/8/2025 |