CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects 9.7.2

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects --version 9.7.2
                    
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects -Version 9.7.2
                    
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="CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects" Version="9.7.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects" Version="9.7.2" />
                    
Directory.Packages.props
<PackageReference Include="CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects" />
                    
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 CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects --version 9.7.2
                    
#r "nuget: CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects, 9.7.2"
                    
#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 CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects@9.7.2
                    
#: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=CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects&version=9.7.2
                    
Install as a Cake Addin
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects&version=9.7.2
                    
Install as a Cake Tool

CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects library

This package provides .NET Aspire integration for SQL Server Database Projects. It allows you to publish SQL Database Projects as part of your .NET Aspire AppHost projects. It currently works with both MSBuild.Sdk.SqlProj and Microsoft.Build.Sql (aka .sqlprojx) based projects.

Usage

To use this package, install it into your .NET Aspire AppHost project:

dotnet add package CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects

Next, add a reference to the MSBuild.Sdk.SqlProj or Microsoft.Build.Sql project you want to publish in your .NET Aspire AppHost project:

dotnet add reference ../MySqlProj/MySqlProj.csproj

Note: Adding this reference will currently result in warning ASPIRE004. This is a known issue and will be resolved in a future release.

Finally add the project as a resource to your .NET Aspire AppHost:

var builder = DistributedApplication.CreateBuilder(args);

var sql = builder.AddSqlServer("sql")
                 .AddDatabase("test");

builder.AddSqlProject<Projects.MySqlProj>("mysqlproj")
       .WithReference(sql);

builder.Build().Run();

Now when you run your .NET Aspire AppHost project you will see the SQL Database Project being published to the specified SQL Server.

Local .dacpac file support

If you are sourcing your .dacpac file from somewhere other than a project reference, you can also specify the path to the .dacpac file directly:

var builder = DistributedApplication.CreateBuilder(args);

var sql = builder.AddSqlServer("sql")
                 .AddDatabase("test");

builder.AddSqlProject("mysqlproj")
       .WithDacpac("path/to/mysqlproj.dacpac")
       .WithReference(sql);

builder.Build().Run();

Support for existing SQL Server

Instead of using the AddSqlServer method to use a SQL Server container, you can specify a connection string to an existing server:

var builder = DistributedApplication.CreateBuilder(args);

// Get an existing connection string from the configuration
var connection = builder.AddConnectionString("Aspire");

builder.AddSqlProject<Projects.SdkProject>("mysqlproj")
       .WithReference(connection);

builder.Build().Run();

Deployment options support

Define options that affect the behavior of package deployment.

var builder = DistributedApplication.CreateBuilder(args);

var sql = builder.AddSqlServer("sql")
                 .AddDatabase("test");

builder.AddSqlProject("mysqlproj")
       .WithConfigureDacDeployOptions(options => options.IncludeCompositeObjects = true)
       .WithReference(sql);

builder.Build().Run();
Product 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. 
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
9.8.0-beta.364 0 9/1/2025
9.7.2 133 8/29/2025
9.7.2-beta.362 131 8/29/2025
9.7.2-beta.361 134 8/29/2025
9.7.2-beta.360 138 8/29/2025
9.7.2-beta.359 149 8/28/2025
9.7.2-beta.358 147 8/28/2025
9.7.2-beta.357 150 8/28/2025
9.7.1 245 8/27/2025
9.7.1-beta.355 154 8/27/2025
9.7.1-beta.354 157 8/27/2025
9.7.1-beta.353 152 8/27/2025
9.7.1-beta.352 154 8/27/2025
9.7.1-beta.351 159 8/27/2025
9.7.1-beta.348 127 8/14/2025
9.7.1-beta.344 68 8/10/2025
9.7.1-beta.343 193 8/8/2025
9.7.1-beta.342 194 8/7/2025
9.7.1-beta.341 196 8/6/2025
9.7.1-beta.340 179 8/5/2025
9.7.1-beta.339 178 8/5/2025
9.7.0 1,035 8/1/2025
9.7.0-beta.337 76 8/1/2025
9.7.0-beta.336 89 8/1/2025
9.7.0-beta.335 88 8/1/2025
9.7.0-beta.333 93 7/30/2025
9.6.1-beta.332 91 7/30/2025
9.6.1-beta.331 93 7/30/2025
9.6.1-beta.330 96 7/30/2025
9.6.1-beta.329 91 7/30/2025
9.6.1-beta.328 119 7/29/2025
9.6.1-beta.327 94 7/28/2025
9.6.1-beta.326 94 7/28/2025
9.6.0 2,401 7/10/2025
9.6.0-beta.324 116 7/10/2025
9.5.1-beta.323 114 7/10/2025
9.5.1-beta.322 118 7/10/2025
9.5.1-beta.321 119 7/10/2025
9.5.1-beta.320 118 7/9/2025
9.5.1-beta.319 119 7/8/2025
9.5.1-beta.318 120 7/2/2025
9.5.1-beta.317 112 6/30/2025
9.5.1-beta.315 119 6/26/2025
9.5.1-beta.314 122 6/23/2025
9.5.1-beta.313 111 6/20/2025
9.5.1-beta.312 111 6/20/2025
9.5.1-beta.311 120 6/18/2025
9.5.1-beta.310 124 6/17/2025
9.5.1-beta.309 116 6/17/2025
9.5.1-beta.308 127 6/17/2025
9.5.1-beta.307 123 6/16/2025
9.5.1-beta.306 274 6/11/2025
9.5.1-beta.305 106 6/7/2025
9.5.1-beta.304 109 6/6/2025
9.5.1-beta.303 154 6/4/2025
9.5.1-beta.302 128 6/4/2025
9.5.1-beta.301 129 6/2/2025
9.5.1-beta.300 133 5/28/2025
9.5.0 4,644 5/27/2025
9.5.0-beta.299 129 5/27/2025
9.5.0-beta.298 138 5/26/2025
9.5.0-beta.297 82 5/24/2025
9.5.0-beta.296 78 5/24/2025
9.5.0-beta.295 60 5/24/2025
9.4.1-beta.291 133 5/19/2025
9.4.1-beta.289 148 5/16/2025
9.4.1-beta.288 200 5/16/2025
9.4.1-beta.287 193 5/16/2025
9.4.1-beta.286 201 5/16/2025
9.4.1-beta.285 203 5/14/2025
9.4.1-beta.284 210 5/13/2025
9.4.1-beta.283 217 5/12/2025
9.4.1-beta.282 130 5/7/2025
9.4.1-beta.280 135 5/2/2025
9.4.1-beta.279 127 5/2/2025
9.4.1-beta.277 139 4/23/2025
9.4.1-beta.276 142 4/23/2025
9.4.1-beta.275 147 4/23/2025
9.4.1-beta.274 145 4/23/2025
9.4.1-beta.273 136 4/23/2025
9.4.1-beta.272 143 4/23/2025
9.4.1-beta.271 138 4/23/2025
9.4.1-beta.270 151 4/20/2025
9.4.0 3,686 4/20/2025
9.4.0-beta.269 144 4/20/2025
9.4.0-beta.268 135 4/20/2025
9.3.1-beta.267 146 4/20/2025
9.3.1-beta.266 72 4/19/2025
9.3.1-beta.265 275 4/15/2025
9.3.1-beta.264 165 4/15/2025
9.3.1-beta.263 173 4/15/2025
9.3.1-beta.262 176 4/15/2025
9.3.1-beta.260 152 4/10/2025
9.3.1-beta.259 1,329 4/8/2025
9.3.1-beta.258 147 4/8/2025
9.3.1-beta.257 142 4/8/2025
9.3.1-beta.256 146 4/8/2025
9.3.1-beta.255 140 4/8/2025
9.3.1-beta.254 147 4/8/2025
9.3.1-beta.253 155 4/1/2025
9.3.1-beta.252 390 3/27/2025
9.3.1-beta.250 117 3/27/2025
9.3.1-beta.249 115 3/27/2025
9.3.1-beta.248 117 3/27/2025
9.3.1-beta.247 124 3/27/2025
9.3.1-beta.244 468 3/25/2025
9.3.1-beta.242 463 3/24/2025
9.3.1-beta.241 148 3/19/2025
9.3.0 5,679 3/19/2025
9.3.0-beta.239 128 3/19/2025
9.2.2-beta.237 140 3/19/2025
9.2.2-beta.236 109 3/14/2025
9.2.2-beta.230 147 3/13/2025
9.2.2-beta.229 138 3/13/2025
9.2.2-beta.228 156 3/11/2025
9.2.2-beta.227 142 3/11/2025
9.2.2-beta.226 146 3/11/2025
9.2.2-beta.225 139 3/11/2025
9.2.2-beta.224 138 3/11/2025
9.2.2-beta.223 154 3/10/2025
9.2.2-beta.222 157 3/10/2025
9.2.2-beta.220 146 3/9/2025
9.2.2-beta.218 145 3/9/2025
9.2.2-beta.217 193 3/7/2025
9.2.2-beta.216 184 3/7/2025
9.2.2-beta.215 186 3/7/2025
9.2.2-beta.214 185 3/5/2025
9.2.2-beta.213 179 3/5/2025
9.2.2-beta.212 176 3/5/2025
9.2.2-beta.211 187 3/4/2025
9.2.2-beta.210 187 3/4/2025
9.2.2-beta.208 82 3/3/2025
9.2.1 1,473 3/3/2025
9.2.1-beta.207 121 3/2/2025
9.2.1-beta.206 79 3/1/2025
9.2.1-beta.205 79 2/27/2025
9.2.1-beta.204 81 2/26/2025
9.2.1-beta.203 74 2/26/2025
9.2.0 847 2/26/2025
9.2.0-beta.202 80 2/26/2025
9.2.0-beta.201 95 2/26/2025
9.2.0-beta.199 74 2/26/2025
9.2.0-beta.198 68 2/26/2025
9.1.1-beta.197 94 2/25/2025
9.1.1-beta.196 78 2/25/2025
9.1.1-beta.195 84 2/25/2025
9.1.1-beta.194 76 2/25/2025
9.1.1-beta.193 74 2/25/2025
9.1.1-beta.192 80 2/24/2025
9.1.1-beta.191 92 2/24/2025
9.1.1-beta.190 84 2/19/2025
9.1.1-beta.189 84 2/19/2025
9.1.1-beta.188 81 2/19/2025
9.1.1-beta.187 88 2/19/2025
9.1.1-beta.183 96 2/18/2025
9.1.1-beta.182 82 2/18/2025
9.1.1-beta.181 102 2/18/2025
9.1.1-beta.180 86 2/17/2025
9.1.1-beta.178 84 2/17/2025
9.1.1-beta.177 102 2/12/2025
9.1.1-beta.176 102 2/11/2025
9.1.1-beta.175 91 2/11/2025
9.1.1-beta.173 95 2/10/2025
9.1.1-beta.169 87 2/6/2025
9.1.1-beta.168 77 2/5/2025
9.1.1-beta.166 145 2/5/2025
9.1.1-beta.165 72 2/5/2025
9.1.1-beta.164 83 2/3/2025
9.1.1-beta.162 75 2/3/2025
9.1.1-beta.155 88 1/30/2025
9.1.1-beta.154 90 1/30/2025
9.1.1-beta.153 70 1/30/2025
9.1.1-beta.152 71 1/29/2025
9.1.1-beta.150 86 1/29/2025
9.1.1-beta.148 88 1/26/2025
9.1.1-beta.147 75 1/26/2025
9.1.1-beta.146 77 1/23/2025
9.1.1-beta.145 68 1/22/2025
9.1.1-beta.144 75 1/22/2025
9.1.1-beta.142 79 1/22/2025
9.1.1-beta.140 72 1/22/2025
9.1.1-beta.139 82 1/21/2025
9.1.1-beta.138 68 1/20/2025
9.1.1-beta.137 69 1/17/2025
9.1.1-beta.136 73 1/15/2025
9.1.1-beta.135 42 1/15/2025
9.1.1-beta.134 43 1/15/2025
9.1.1-beta.128 65 1/9/2025
9.1.1-beta.127 56 1/9/2025
9.1.1-beta.126 70 1/9/2025
9.1.1-beta.125 84 1/9/2025
9.1.1-beta.124 69 1/9/2025
9.1.0 2,806 12/12/2024
9.1.0-beta.123 87 1/3/2025
9.1.0-beta.122 93 1/3/2025
9.1.0-beta.121 76 1/2/2025
9.1.0-beta.120 79 12/30/2024
9.1.0-beta.119 72 12/30/2024
9.1.0-beta.118 80 12/30/2024
9.1.0-beta.116 84 12/30/2024
9.1.0-beta.114 75 12/30/2024
9.1.0-beta.113 75 12/30/2024
9.1.0-beta.112 75 12/18/2024
9.1.0-beta.110 84 12/16/2024
9.1.0-beta.109 82 12/12/2024
9.0.1-beta.108 96 12/12/2024
9.0.1-beta.107 78 12/11/2024
9.0.1-beta.106 79 12/12/2024
9.0.1-beta.104 80 12/11/2024
9.0.1-beta.102 77 12/6/2024
9.0.1-beta.99 84 12/6/2024
9.0.1-beta.98 76 12/6/2024
9.0.1-beta.95 77 12/5/2024
9.0.1-beta.94 73 12/5/2024
9.0.1-beta.93 70 12/2/2024
9.0.1-beta.92 175 11/30/2024
9.0.1-beta.91 79 11/30/2024
9.0.1-beta.90 82 11/29/2024
9.0.1-beta.89 88 11/29/2024
9.0.1-beta.88 80 11/27/2024
9.0.1-beta.87 76 11/27/2024
9.0.1-beta.86 82 11/27/2024
9.0.1-beta.84 89 11/24/2024
9.0.1-beta.83 83 11/22/2024
9.0.1-beta.82 84 11/21/2024
9.0.1-beta.81 81 11/19/2024
9.0.1-beta.80 68 11/19/2024
9.0.1-beta.79 82 11/19/2024
9.0.1-beta.77 78 11/15/2024
9.0.0 689 11/15/2024
9.0.0-beta.76 79 11/14/2024
9.0.0-beta.75 81 11/14/2024
9.0.0-beta.74 79 11/14/2024
9.0.0-beta.73 204 11/14/2024
9.0.0-beta.72 69 11/14/2024
9.0.0-beta.71 75 11/13/2024
9.0.0-beta.70 135 11/13/2024
9.0.0-beta.69 82 11/13/2024
9.0.0-beta.68 84 11/13/2024
9.0.0-beta.67 74 11/13/2024
9.0.0-beta.66 117 11/13/2024
9.0.0-beta.63 87 11/12/2024