FonsecaFramework.Aspire
2026.4.15.1
dotnet add package FonsecaFramework.Aspire --version 2026.4.15.1
NuGet\Install-Package FonsecaFramework.Aspire -Version 2026.4.15.1
<PackageReference Include="FonsecaFramework.Aspire" Version="2026.4.15.1" />
<PackageVersion Include="FonsecaFramework.Aspire" Version="2026.4.15.1" />
<PackageReference Include="FonsecaFramework.Aspire" />
paket add FonsecaFramework.Aspire --version 2026.4.15.1
#r "nuget: FonsecaFramework.Aspire, 2026.4.15.1"
#:package FonsecaFramework.Aspire@2026.4.15.1
#addin nuget:?package=FonsecaFramework.Aspire&version=2026.4.15.1
#tool nuget:?package=FonsecaFramework.Aspire&version=2026.4.15.1
FonsecaFramework.Aspire
Extensions and helpers for .NET Aspire distributed applications.
Overview
FonsecaFramework.Aspire is a .NET 9 library that provides extension methods for the .NET Aspire IDistributedApplicationBuilder to simplify working with SQL Server resources. It supports connecting to existing SQL Server instances, adding SQL Server Docker containers, and registering SqlExecuter instances in the Aspire service defaults pipeline.
Installation
dotnet add package FonsecaFramework.Aspire
Features
| Area | Key Classes / Methods |
|---|---|
| Existing SQL Server | AddExistingSqlServer() — register an existing SQL Server instance as an Aspire resource |
| Existing Database | AddExistingSqlDatabase() — register an existing database on a SQL Server resource |
| SQL Server Docker | AddSqlServerDocker() — spin up a SQL Server container with auto-generated passwords |
| Resource Models | ExistingSqlServerResource, ExistingSqlDatabaseResource — Aspire-compatible resource types with connection string expressions |
Examples
Connect to an Existing SQL Server
using FonsecaFramework.Aspire.Mssql;
var builder = DistributedApplication.CreateBuilder(args);
var sqlServer = builder.AddExistingSqlServer(
name: "production-sql",
connectionString: "Server=prod-server;Integrated Security=True;TrustServerCertificate=True;");
var myDatabase = sqlServer.AddExistingSqlDatabase(
name: "my-database",
databaseName: "AppDb");
builder.AddProject<Projects.MyWebApi>("api")
.WithReference(myDatabase);
builder.Build().Run();
Add a SQL Server Docker Container
using FonsecaFramework.Aspire.Mssql;
var builder = DistributedApplication.CreateBuilder(args);
var sqlServer = builder.AddSqlServerDocker(
name: "dev-sql",
port: 1433);
var database = sqlServer.AddDatabase("appdb");
builder.AddProject<Projects.MyWebApi>("api")
.WithReference(database);
builder.Build().Run();
Requirements
- .NET 9.0
- .NET Aspire workload installed
License
Copyright 2025 Steven Fonseca / VLR Creations
Licensed under the Apache License, Version 2.0. You may use this library free of charge, provided you include the required attribution notices. See the LICENSE file for full terms.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net9.0
- Aspire.Hosting.AppHost (>= 13.2.2)
- Aspire.Hosting.Redis (>= 13.2.2)
- Aspire.Hosting.SqlServer (>= 13.2.2)
- Aspire.Microsoft.Data.SqlClient (>= 13.2.2)
- FonsecaFramework.Sql (>= 2026.4.15.1)
- KubernetesClient (>= 19.0.2)
- Npgsql (>= 10.0.2)
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 |
|---|---|---|
| 2026.4.15.1 | 0 | 4/15/2026 |
| 2026.4.13.1 | 56 | 4/13/2026 |
| 2026.4.10.1 | 51 | 4/10/2026 |
| 2026.4.8.1 | 50 | 4/8/2026 |
| 2026.4.7.1 | 76 | 4/7/2026 |
| 2026.4.3.1 | 84 | 4/3/2026 |
| 2026.4.1.1 | 97 | 4/1/2026 |
| 2026.3.30.1 | 91 | 3/30/2026 |
| 2026.3.26.2 | 88 | 3/26/2026 |
| 2026.3.26.1 | 81 | 3/26/2026 |
| 2026.3.24.1 | 91 | 3/24/2026 |
| 2026.3.23.1 | 84 | 3/23/2026 |
| 2026.3.20.1 | 85 | 3/20/2026 |
| 2026.3.19.2 | 88 | 3/19/2026 |
| 2026.3.19.1 | 84 | 3/19/2026 |
| 2026.3.18.1 | 89 | 3/19/2026 |
| 2026.3.13.1 | 91 | 3/13/2026 |
| 2026.3.9.1 | 92 | 3/9/2026 |
| 2026.3.6.1 | 88 | 3/6/2026 |
| 2026.2.27.1 | 95 | 2/27/2026 |