DacFx
DacFx copied to clipboard
Building SSDT project for with dotnet tooling (Microsoft.Build.Sql - 0.1.3-preview)
- SqlPackage or DacFx Version: Microsoft.Build.Sql 0.1.3-preview
- .NET Framework (Windows-only) or .NET Core: both
- Environment (local platform and source/target platforms):
- Windows 10
- Visual Studio 2022 Community
Steps to Reproduce:
- Create a new Database Project in Visual Studio 2022
- Add a post deploy script
- Reference another file in the post deploy script - the build action should be none for the script, like so:
: .\myfile.sql
- So far everything should still build
- Add a reference to the
Microsoft.Build.Sqlas per https://github.com/microsoft/DacFx/tree/main/src/Microsoft.Build.Sql
<Project ...
<Sdk Name="Microsoft.Build.Sql" Version="0.1.3-preview" />
...
</Project>
- Try to build the project - it will no longer work and you will an error:
Build error SQL70001: This statement is not recognized in this context.
Did this occur in prior versions? If not - which version(s) did it work in? no idea
(DacFx)
Hi @ben-purcell thank you for opening this issue. Right now SDK-style database projects are only supported on the 'SQL Database Projects' extension in Azure Data Studio or VS Code. Support in SSDT will be added in a future release.
It's 2 years later, when in this support for Visual Studio going to arrive?
Consolidating into #180, as there's some workaround discussions there. We are working on the Visual Studio support for SDK-style SQL projects and will be posting updates there.