Releases: rr-wfm/MSBuild.Sdk.SqlProj
Allow overriding dacpac filename for a package reference
Up until version 2.5.0 MSBuild.Sdk.SqlProj has assumed that the name of the .dacpac
file in a PackageReference
is the same as the ID of the package being referenced. Although this is the case in many scenarios, there are scenarios where a referenced package might contain multiple .dacpac
's or the filenames might not be the same. Therefore we now support specifying a DacpacName
attribute on a PackageReference
that allows for overriding the name of the .dacpac
being referenced from that package.
This is especially useful for referencing the new Microsoft.SqlServer.Dacpacs packages released by Microsoft, which contain the definitions of the master
and msdb
databases.
Default values for SQLCMD variables
In this release we've made sure that any default values configured in the MSBuild.Sdk.SqlProj
project are also embedded in the resulting .dacpac
so that they may be used during deployment. Thanks to @Geims83 for his contribution.
SQL Server 2022 support
Starting with version 2.3.0 we now support targeting SQL Server 2022 with MSBuild.Sdk.SqlProj. Thanks to @ErikEJ for his contribution.
Note: In this release we've made a change so that when using
dotnet publish
to deploy your project to a development SQL Server we're not using an encrypted connection by default (ie. the connection string'sEncrypt
property is set toFalse
). As development SQL Servers typically don't have a TLS certificate and ourdotnet publish
support is targeted at development scenario's we feel that this is a good default. For production deployments we recommend using thesqlpackage
tool, which fully supports encrypted connections.
Support for .NET 7
With version 2.2.0 we now support building using the .NET 7 SDK. Thanks to @ErikEJ for his contribution.
Please note that with this release we've also dropped support for .NET 5 as it is no longer supported by Microsoft. If you're still using .NET 5 we recommend you keep using your current version of MSBuild.Sdk.SqlProj until you're ready to upgrade to .NET 6 or 7.
.NET 6 support
Version 2.0.0 is the first official release to support the .NET 6.0 SDK.
This is breaking version in the sense that we've dropped support for the .NET Core 2.1 SDK, since that has gone out of support itself. If you're still required to use the .NET Core 2.1 SDK we recommend you stay on the 1.x release of MSBuild.Sdk.SqlProj, but beware that new features and bugfixes will only come to newer 2.x versions going forward. Feel free to open an issue if this is blocking you in anyway.
Other than that, no functional changes have been made in this release and upgrading should be as easy as updating your project file. We do however still recommend using netstandard2.0
as the target framework in your MSBuild.Sdk.SqlProj projects, instead of net6.0
.
Deployment properties during script generation
With 1.17.3 we now take all of the deployment properties configured into the project into account when generating a deployment script as part of the build. Thanks to @dovic95 for this contribution on this feature.
Script generation includes composite objects
This releases ensures that if IncludeCompositeObjects
is set to true
(which is the default) it will also be applied when generating a create script using the GenerateCreateScript
option. Previously the value of IncludeCompositeObjects
was ignored entirely.
Thanks to @dovic95 for his contribution on this feature.
Support for .NET 6
Version 2.0 will be the first version that will have support for .NET 6, but since some of our dependencies are not yet ready for .NET 6 we're shipping this as a preview version. We encourage you to test this release and please report any issues you encounter here on GitHub.
Note: We've also dropped our support for .NET Core 2.1 in this release since it is no longer being supported by Microsoft. If you're still on .NET Core 2.1 we recommend staying on the 1.x releases.
Small improvements
Version 1.17.0 includes a bunch of small but nonetheless useful new features thanks to contributions from @AroglDarthu:
- We now apply the value of the property
TargetDatabaseName
when generating a script usingGenerateCreateScript
. Previously that property was ignored during script generation and it would always use the name of the project file - We now allow a regular C# project to reference an MSBuild.Sdk.SqlProj project by using a
<ProjectReference>
with theReferenceOutputAssembly
attribute set toFalse
. This will make it so that the.dacpac
ends up in the bin folder of the referencing project. - Finally we've fixed an issue where
TreatTSqlWarningsAsErrors
would be overridden byTreatWarningsAsErrors
. Setting the latter toTrue
no longer also implies thatTreatTSqlWarningsAsErrors
is set toTrue
.
Please note that this will probably be the last release with support for .NET Core 2.1. Future versions will drop this support since .NET Core 2.1 itself has also gone out of support.
Improved error message
In this release we've improved the error message in case you're using an SDK that bundles a newer or older version of the runtime which we do not support. We now point you to the ability to write a global.json
to force a specific SDK version.
Thanks to @ErikEJ for his contribution.