Skip to content

Provide an official tSQLt .dacpac as a NuGet package #211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nealmummau opened this issue May 1, 2025 · 0 comments
Open

Provide an official tSQLt .dacpac as a NuGet package #211

nealmummau opened this issue May 1, 2025 · 0 comments

Comments

@nealmummau
Copy link

nealmummau commented May 1, 2025

Background
tSQLt today distributes a set of compiled .dacpac files—e.g. tSQLt.2019.dacpac, tSQLt.2017.dacpac, etc.—but no official NuGet feed. The MSBuild.Sdk.SqlProj documentation describes how you can reference a .dacpac from a NuGet package in your .csproj by using the DacpacName metadata. Without an official package on NuGet.org, teams must roll their own .nuspec and private feed just to pull in the right tSQLt version.

Without a NuGet package, teams using MSBuild.Sdk.SqlProj must create and maintain their own .nuspec and private package feed just to reference tSQLt in their database projects.

Proposal
Publish one NuGet package per SQL Server version, each containing exactly one .dacpac. For example:

  • tSQLt.Sql2019.Dacpac → contains tSQLt.2019.dacpac
  • tSQLt.Sql2017.Dacpac → contains tSQLt.2017.dacpac
  • …and so on for each supported version.

Example Usage
A project targeting SQL 2019 would reference

<Project Sdk="MSBuild.Sdk.SqlProj/3.1.0">
  <PropertyGroup>
    <TargetFramework>netstandard2.1</TargetFramework>
    <!-- 150 = SQL Server 2019 -->
    <SqlServerVersion>150</SqlServerVersion>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference
      Include="tSQLt.Sql2019.Dacpac"
      Version="1.0.0" <!-- bump as new tSQLt versions are released -->
      DacpacName="tSQLt"
      DatabaseVariableLiteralValue="tSQLt" />
  </ItemGroup>
</Project>

For SQL 2017:

<PackageReference
  Include="tSQLt.Sql2017.Dacpac"
  Version="1.0.0"
  DacpacName="tSQLt"
  DatabaseVariableLiteralValue="tSQLt" />

Benefits

  • Minimal footprint: only the single .dacpac you need is restored.
  • Familiar model: mirrors Microsoft’s Microsoft.SqlServer.Dacpacs.* approach.
  • Clear versioning: package version aligns with tSQLt framework releases.

Request
Could you please publish tSQLt.Sql2019.Dacpac, tSQLt.Sql2017.Dacpac, etc., to NuGet.org? Having an official, per-version package will streamline adoption in MSBuild.Sdk.SqlProj–based database projects. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant