Skip to content

External databases and .NET 5.0 support

Compare
Choose a tag to compare
@jmezach jmezach released this 06 Sep 15:42
· 2 commits to release/v1.6.0 since this release

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.