Tamp.SqlPackage
0.1.0
Prefix Reserved
dotnet add package Tamp.SqlPackage --version 0.1.0
NuGet\Install-Package Tamp.SqlPackage -Version 0.1.0
<PackageReference Include="Tamp.SqlPackage" Version="0.1.0" />
<PackageVersion Include="Tamp.SqlPackage" Version="0.1.0" />
<PackageReference Include="Tamp.SqlPackage" />
paket add Tamp.SqlPackage --version 0.1.0
#r "nuget: Tamp.SqlPackage, 0.1.0"
#:package Tamp.SqlPackage@0.1.0
#addin nuget:?package=Tamp.SqlPackage&version=0.1.0
#tool nuget:?package=Tamp.SqlPackage&version=0.1.0
Tamp.SqlPackage
Typed wrappers for the
sqlpackageCLI (Microsoft.SqlPackage):.dacpacPublish / Extract / Script for SQL Server and Azure SQL. Cross-platform —sqlpackageships as a dotnet tool and runs on Windows, macOS, and Linux.
| Package | Status |
|---|---|
Tamp.SqlPackage |
0.1.0 (initial) |
Install
dotnet add package Tamp.SqlPackage
Multi-targets net8 / net9 / net10. Requires sqlpackage on PATH (install with dotnet tool install -g Microsoft.SqlPackage).
Quick start — publish a .dacpac
using Tamp;
using Tamp.SqlPackage;
class Build : TampBuild
{
public static int Main(string[] args) => Execute<Build>(args);
[FromPath("sqlpackage")] readonly Tool SqlPackage = null!;
[Parameter] readonly Secret TargetConn = null!; // sourced from env or .tamp/secrets
Target Publish => _ => _.Executes(() => SqlPackage.Publish(SqlPackage, s => s
.SetSourceFile("artifacts/MyDb.dacpac")
.SetTargetConnectionString(TargetConn)
.SetProperty("BlockOnPossibleDataLoss", "false")));
}
Verb surface (v1)
| Verb | Wraps | Required |
|---|---|---|
Publish |
/Action:Publish |
SourceFile, target (connection string OR server+database) |
Extract |
/Action:Extract |
TargetFile, source (connection string OR server+database) |
Script |
/Action:Script |
SourceFile, OutputPath, target (connection string OR server+database) |
Held for v2: Export, Import, DeployReport, DriftReport. File an issue if you need one.
Common knobs (every verb)
- Connection vs. server/database split — supply either a full
Secretconnection string OR a plain server name + database name. Connection strings are always tracked asSecretand redacted from logs / plan emission. - Properties —
/p:Name=Valuerepeatable, set via.SetProperty(name, value). - SqlCmd variables —
/v:Name=Valuerepeatable, set via.SetVariable(name, value). - Access token —
/AccessToken:for Azure AD token-based auth, accepts aSecret. - Profile —
/Profile:publish.profile.xmlfor DAC Publish Profile. - Output controls —
OverwriteFiles,Quiet,Diagnostics,DiagnosticsFile.
Settings authoring — fluent or object-init
Both styles produce identical CommandPlans. Fluent is canonical in docs / tamp init templates:
// Fluent
SqlPackage.Publish(SqlPackage, s => s
.SetSourceFile("a.dacpac")
.SetTargetConnectionString(conn));
// Object-init
SqlPackage.Publish(SqlPackage, new PublishSettings
{
SourceFile = "a.dacpac",
TargetConnectionString = conn,
});
Cross-platform note
sqlpackage ships as the Microsoft.SqlPackage dotnet global tool and runs on Windows, macOS, and Linux. Argument format is Windows-style /Name:Value single-token (not POSIX --name value pairs); each flag is one process arg.
License
MIT — see LICENSE.
| 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 is compatible. 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. |
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 |
|---|---|---|
| 0.1.0 | 100 | 5/22/2026 |