Skip to content

Releases: rr-wfm/MSBuild.Sdk.SqlProj

Support for large projects

08 Sep 17:57
Compare
Choose a tag to compare

For some larger projects users could run into an issue, especially on Windows, where the command line tool being run by the SDK to perform the actual packaging would fail because the command line arguments list would be too long. This has now been resolved by writing the list of files that are included in the project to a text file, which is then picked up by the command line tool.

Thanks to @jeffrosenberg for this contribution.

External databases and .NET 5.0 support

06 Sep 15:42
Compare
Choose a tag to compare

This releases adds support for using a PackageReference as an external database. This is useful if you want to make use of database objects that are defined in another database, for example the master database. This is achieved by adding the DatabaseVariableLiteralValue item metadata to the package reference and setting it to the name of the external database. You can then use objects from the referenced .dacpac using the [<database-variable-literal-value>].[<schema>].[<object>] syntax within your project.

Additionally we now support building projects leveraging MSBuild.Sdk.SqlProj with the .NET 5.0 preview SDK's. Previously if you had the preview SDK installed you would encounter the error message The current SDK bundles target framework 'netcoreapp5.0)' which is not supported by MSBuild.Sdk.SqlProj. Either install a .NET Core SDK that supports 2.1 or 3.1, or file an issue at https://github.com/jmezach/MSBuild.Sdk.SqlProj/ to add support.. This could be resolved by adding a global.json pinning your SDK version to either 2.1 or 3.1. Now the error should no longer appear if you have the 5.0 preview SDK installed.

Bugfix

03 Sep 10:43
Compare
Choose a tag to compare

This releases fixes bug #50. On Windows builds would fail if the username of the current user contains a space. This has now been fixed.

RefactorLog support

02 Sep 09:16
Compare
Choose a tag to compare

The original SQL Server Database Projects maintain a log of refactorings performed in the database project. These are stored in a .refactorlog file. In previous versions of MSBuild.Sdk.SqlProj these weren't embedded in the resulting .dacpac. Now we embed this file into the package if it is defined in the .csproj using the following syntax:

<Project Sdk="MSBuild.Sdk.SqlProj/1.5.0">
  ...
  <ItemGroup>
    <RefactorLog Include="TestProject.refactorlog" />
  </ItemGroup>
  ...
</Project>

Template pack

31 Aug 19:17
Compare
Choose a tag to compare

Starting with 1.4.0 we are now also shipping a set of templates that can be used with dotnet new. These ship as a separate NuGet package that can be installed using dotnet new --install MSBuild.Sdk.SqlProj.Templates. After that you can create new projects using dotnet new sqlproj. We've also included item templates for some of the most common SQL object types such as Tables, Views, Stored Procedures and Functions. If you feel a particular object type is missing please don't hesitate to file an issue or submit a PR. Eventually these templates will also start showing up in Visual Studio. This feature is currently in preview and we've already identified an issue that the Visual Studio team will be looking into.

Note that the version of the templates is updated in lock-step with the main package itself, meaning that when a new version of MSBuild.Sdk.SqlProj ships a new version of MSBuild.Sdk.SqlProj.Templates is also shipping and the template will reference the new version of MSBuild.Sdk.SqlProj. You can update your installed version of the templates using dotnet new --update-apply. Although we've also shipped a new version of MSBuild.Sdk.SqlProj with this release no changes have been made to its functionality. We've merely added the templates.

Floating versions and incremental build support

24 Aug 15:14
Compare
Choose a tag to compare

Version 1.3.0 introduces support for floating versions for PackageReferences allowing you to specify a version like1.3.* for a package reference and it will resolve to the latest 1.3 version of the specified package available. Thanks to @jeffrosenberg for his contribution on this.

This version also adds incremental build support meaning which should speed up repeated builds. As long as the source files (*.sql) and the project file (.csproj) have the same or an older last modified date as the .dacpac the .dacpac will not be build again. This saves the time needed to rebuild the package. Thanks to @jvilimek for his contribution.

Adding publishing support

09 Aug 12:01
Compare
Choose a tag to compare

MSBuild.Sdk.SqlProj 1.2.0 introduces support for publishing a project to a local SQL Server instance. On Windows running dotnet publish should work out-of-the-box if you have a default SQL Server instance installed on your machine. On Mac and Linux we cannot use Windows authentication, so you'll need to specify a username and password. Checkout the README for more details on how publishing works and how you can customize the process to suit your needs.

IMPORTANT: With this release we've dropped support for .NET Core 2.2 since that version is end-of-life. You should upgrade your projects to .NET Core 3.1.

Fix cross-platform issues

08 Aug 08:32
Compare
Choose a tag to compare

Two issues have been resolved that could be observed when using MSBuild.Sdk.SqlProj on Mac and/or Linux.

SqlCmd variables and pre/post-deployment script support

12 May 19:46
Compare
Choose a tag to compare

This release added support for SqlCmd variables as well as pre- and postdeployment scripts to be included with the .dacpac.

Added LICENSE

10 Apr 11:13
Compare
Choose a tag to compare

Added a LICENSE to the NuGet package