Aspire.Hosting.SqlServer
9.4.1
Prefix Reserved
dotnet add package Aspire.Hosting.SqlServer --version 9.4.1
NuGet\Install-Package Aspire.Hosting.SqlServer -Version 9.4.1
<PackageReference Include="Aspire.Hosting.SqlServer" Version="9.4.1" />
<PackageVersion Include="Aspire.Hosting.SqlServer" Version="9.4.1" />
<PackageReference Include="Aspire.Hosting.SqlServer" />
paket add Aspire.Hosting.SqlServer --version 9.4.1
#r "nuget: Aspire.Hosting.SqlServer, 9.4.1"
#:package Aspire.Hosting.SqlServer@9.4.1
#addin nuget:?package=Aspire.Hosting.SqlServer&version=9.4.1
#tool nuget:?package=Aspire.Hosting.SqlServer&version=9.4.1
Aspire.Hosting.SqlServer library
Provides extension methods and resource definitions for a .NET Aspire AppHost to configure a SQL Server database resource.
Getting started
Install the package
In your AppHost project, install the .NET Aspire SQL Server Hosting library with NuGet:
dotnet add package Aspire.Hosting.SqlServer
Usage example
Then, in the AppHost.cs file of AppHost
, add a SQL Server resource and consume the connection using the following methods:
var db = builder.AddSqlServer("sql").AddDatabase("db")
var myService = builder.AddProject<Projects.MyService>()
.WithReference(db);
Additional documentation
https://learn.microsoft.com/dotnet/aspire/database/sql-server-component https://learn.microsoft.com/dotnet/aspire/database/sql-server-entity-framework-component
Feedback & contributing
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 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. |
-
net8.0
- Aspire.Hosting (>= 9.4.1)
- AspNetCore.HealthChecks.SqlServer (>= 9.0.0)
- AspNetCore.HealthChecks.Uris (>= 9.0.0)
- Azure.Core (>= 1.47.0)
- Azure.Identity (>= 1.14.2)
- Google.Protobuf (>= 3.31.1)
- Grpc.AspNetCore (>= 2.71.0)
- Grpc.Net.ClientFactory (>= 2.71.0)
- Grpc.Tools (>= 2.72.0)
- Humanizer.Core (>= 2.14.1)
- JsonPatch.Net (>= 3.3.0)
- KubernetesClient (>= 17.0.4)
- Microsoft.Data.SqlClient (>= 6.0.2)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.18)
- Microsoft.Extensions.Hosting (>= 8.0.1)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Http (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- Microsoft.Extensions.Options (>= 8.0.2)
- Microsoft.Extensions.Primitives (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.3)
- Polly.Core (>= 8.6.2)
- Semver (>= 3.0.0)
- StreamJsonRpc (>= 2.22.11)
- System.IO.Hashing (>= 9.0.7)
-
net9.0
- Aspire.Hosting (>= 9.4.1)
- AspNetCore.HealthChecks.SqlServer (>= 9.0.0)
- AspNetCore.HealthChecks.Uris (>= 9.0.0)
- Azure.Core (>= 1.47.0)
- Azure.Identity (>= 1.14.2)
- Google.Protobuf (>= 3.31.1)
- Grpc.AspNetCore (>= 2.71.0)
- Grpc.Net.ClientFactory (>= 2.71.0)
- Grpc.Tools (>= 2.72.0)
- Humanizer.Core (>= 2.14.1)
- JsonPatch.Net (>= 3.3.0)
- KubernetesClient (>= 17.0.4)
- Microsoft.Data.SqlClient (>= 6.0.2)
- Microsoft.Extensions.Caching.Memory (>= 9.0.7)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.7)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.7)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 9.0.7)
- Microsoft.Extensions.Hosting (>= 9.0.7)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.7)
- Microsoft.Extensions.Http (>= 9.0.7)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.7)
- Microsoft.Extensions.Options (>= 9.0.7)
- Microsoft.Extensions.Primitives (>= 9.0.7)
- Newtonsoft.Json (>= 13.0.3)
- Polly.Core (>= 8.6.2)
- Semver (>= 3.0.0)
- StreamJsonRpc (>= 2.22.11)
- System.IO.Hashing (>= 9.0.7)
NuGet packages (10)
Showing the top 5 NuGet packages that depend on Aspire.Hosting.SqlServer:
Package | Downloads |
---|---|
Aspire.Hosting.Azure.Sql
Azure SQL Database resource types for .NET Aspire. |
|
CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects
An Aspire hosting integration capable of deploying SQL Server Database Projects as part of your AppHost. |
|
FonsecaFramework.Aspire
Collection of classes and extensions for .NET Aspire |
|
CommunityToolkit.Aspire.Hosting.SqlServer.Extensions
A .NET Aspire integration for extending sqlserver hosting. |
|
EAVFramework.Extensions.Aspire.Hosting
Aspire Hosting package for EAVFramework |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated | |
---|---|---|---|
9.4.1 | 606 | 8/12/2025 | |
9.4.0 | 3,101 | 7/29/2025 | |
9.3.2 | 70,588 | 6/20/2025 | |
9.3.1 | 25,667 | 6/10/2025 | |
9.3.0 | 60,731 | 5/19/2025 | |
9.2.1 | 128,179 | 4/24/2025 | |
9.2.0 | 68,864 | 4/10/2025 | |
9.1.0 | 132,166 | 2/25/2025 | |
9.0.0 | 246,384 | 11/12/2024 | |
9.0.0-rc.1.24511.1 | 5,413 | 10/15/2024 | |
8.2.2 | 33,672 | 10/24/2024 | |
8.2.1 | 28,134 | 9/26/2024 | |
8.2.0 | 85,547 | 8/29/2024 | |
8.1.0 | 18,572 | 7/23/2024 | |
8.0.2 | 17,562 | 6/28/2024 | |
8.0.1 | 38,762 | 5/21/2024 | |
8.0.0 | 2,561 | 5/21/2024 | |
8.0.0-preview.7.24251.11 | 2,796 | 5/7/2024 | |
8.0.0-preview.6.24214.1 | 11,474 | 4/23/2024 | |
8.0.0-preview.5.24201.12 | 4,771 | 4/9/2024 |