Skip to content
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

Deployment Extension Configuration Item Fails SqlBuild #345

Closed
znamenap opened this issue Oct 3, 2023 · 0 comments · Fixed by #463
Closed

Deployment Extension Configuration Item Fails SqlBuild #345

znamenap opened this issue Oct 3, 2023 · 0 comments · Fixed by #463
Assignees
Labels
area: build sdk Related to Microsoft.Build.Sql SDK bug Something isn't working

Comments

@znamenap
Copy link

znamenap commented Oct 3, 2023

  • SqlPackage or DacFx Version: microsoft.build.sql\0.1.12-preview
  • .NET Framework (Windows-only) or .NET Core: .NET Core
  • Environment (local platform and source/target platforms): build on windows using .net 6

Steps to Reproduce:

  1. Checkout the branch at https://github.com/znamenap/DacFx/tree/DeploymentExtensionsFailsSqlBuild/samples/DeploymentExtensionsFailsSqlBuild/SampleDatabase
  2. Change directory to samples\DeploymentExtensionsFailsSqlBuild\SampleDatabase
  3. Build the project via dotnet build
  4. The build produces
seeding.data.sql(4,1,4,1): Build error SQL70001: This statement is not recognized in this context.
  1. This is a regression compared to .NET Framework solution, it successfully accepted the file as the extension for a contributor.
  2. I'm expecting the build would pass the item to contributors.
  3. I'm expecting the build would still validate SQL syntax if the extension is .sql and references to SQL objects, although this feature was not part of previous .NET Framework based implementation.

Did this occur in prior versions? If not - which version(s) did it work in? It worked in .NET Framework based project without SDK-like project.

MSBuild 17.7.1+971bf70db
microsoft.build.sql\0.1.12-preview

Proposal:
I'm suggesting to fix this in SDK.targets similarly as PostDeploy and PreDeploy. Similarly, I believe, the same applies to BuildExtensionConfiguration.
image

  <ItemGroup>
    <!-- Remove files specified as PreDeploy, PostDeploy, and None scripts from build -->
    <Build Remove="@(PreDeploy)" />
    <Build Remove="@(PostDeploy)" />
    <Build Remove="@(None)" />
    <Build Remove="@(DeploymentExtensionConfiguration)" />
    <Build Remove="@(BuildExtensionConfiguration)" />
  </ItemGroup>
@znamenap znamenap added the bug Something isn't working label Oct 3, 2023
@ssreerama ssreerama added the area: build sdk Related to Microsoft.Build.Sql SDK label Oct 4, 2023
@zijchen zijchen closed this as completed Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build sdk Related to Microsoft.Build.Sql SDK bug Something isn't working
Projects
None yet
3 participants