Giter VIP home page Giter VIP logo

Comments (9)

jmezach avatar jmezach commented on June 10, 2024

Interesting, haven't seen this before. What's even more interesting is that the output doesn't seem to suggest that those two arguments are being passed to the DacpacTool, yet that seems to be the complaint of the tool. Can you reproduce this on your local machine? Also do you have a diff you can share with the changes to the workflow? Maybe that will give us some points as to where to look for this issue.

from msbuild.sdk.sqlproj.

ErikEJ avatar ErikEJ commented on June 10, 2024

Can you share your .csproj?

from msbuild.sdk.sqlproj.

popcatalin81 avatar popcatalin81 commented on June 10, 2024

This is the .csproj file

<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="MSBuild.Sdk.SqlProj/2.6.1">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <OutputPath>..\[Redacted].Database.Admin\bin</OutputPath>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <SqlServerVersion>Sql140</SqlServerVersion>
    <AllowSnapshotIsolation>True</AllowSnapshotIsolation>
    <ReadCommittedSnapshot>True</ReadCommittedSnapshot>
    <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
  </PropertyGroup>
  <ItemGroup>
    <Content Include="..\[Redacted].Database.Admin\**\*.sql" Exclude="..\[Redacted].Database.Admin\bin\**;..\[Redacted].Database.Admin\obj\**;..\[Redacted].Database.Admin\Script.*;..\[Redacted].Database.Admin\SeedData\**" />
    <RefactorLog Include="..\[Redacted].Database.Admin\**\*.refactorlog" Exclude="..\[Redacted].Database.Admin\bin\**;..\[Redacted].Database.Admin\obj\**" />
    <None Include="..\[Redacted].Database.Admin\**\*.publish.xml" Exclude="..\[Redacted].Database.Admin\bin\**;..\[Redacted].Database.Admin\obj\**">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Include="..\[Redacted].Database.Admin\**\*.sql" Exclude="..\[Redacted].Database.Admin\bin\**;..\[Redacted].Database.Admin\obj\**;..\[Redacted].Database.Admin\Script.*;"></None>
  </ItemGroup>
  <ItemGroup>
    <Content Remove="..\[Redacted].Database.Admin\dbo\Tables\Alert.sql" />
  </ItemGroup>
  <ItemGroup>
    <None Remove="..\[Redacted].Database.Admin\dbo\Tables\Alert.sql" />
  </ItemGroup>
  <ItemGroup>
    <PostDeploy Include="..\[Redacted].Database.Admin\Script.PostDeployment.sql" />
    <PreDeploy Include="..\[Redacted].Database.Admin\Script.PreDeployment.sql" />
  </ItemGroup>
</Project>

from msbuild.sdk.sqlproj.

popcatalin81 avatar popcatalin81 commented on June 10, 2024

Interesting, haven't seen this before. What's even more interesting is that the output doesn't seem to suggest that those two arguments are being passed to the DacpacTool, yet that seems to be the complaint of the tool. Can you reproduce this on your local machine? Also do you have a diff you can share with the changes to the workflow? Maybe that will give us some points as to where to look for this issue.

No, sadly I cannot reproduce this on my local machine. The workflow actions are identical from one to another (copy paste)
However the github runner decided to use slighly different images for the workflows:

This fails:
image

And this one succeeds:
image

Sadly there's no way to force one image version or another in GH actions.

from msbuild.sdk.sqlproj.

ErikEJ avatar ErikEJ commented on June 10, 2024

This is the spec for the two different images - cannot see any significant diff

2023.txt
2024.txt

from msbuild.sdk.sqlproj.

popcatalin81 avatar popcatalin81 commented on June 10, 2024

For future reference:

Found the issue. The build is broken by the github/codeql-action/init@v3 Github's CodeQL code analysis engine. The action adds hooks to the C# compiler in order to determine what C# projects and code to analyze, however it injects some extra parameters in the build process that are passed to the DacpacTooltask (and other tasks as well). But DacpacTool does not support any extra unknown parameters and instead of ignoring them it just throws.

One point of improvement for the future might be for DacpacTool to have a switch to ignore unknown parameters during build.

from msbuild.sdk.sqlproj.

ErikEJ avatar ErikEJ commented on June 10, 2024

How do you mitigate the parsing issue?

from msbuild.sdk.sqlproj.

popcatalin81 avatar popcatalin81 commented on June 10, 2024

How do you mitigate the parsing issue?

I've split the build into two sections, first one builds the Db projects. Then the CodeQL Init action is called, then the build builds the rest of the projects and finally the Code QL analyze action is called, which means the build hooks are not installed when the DB projects are initially built.

from msbuild.sdk.sqlproj.

ErikEJ avatar ErikEJ commented on June 10, 2024

@jmezach Wonder if this could be a solution: https://stackoverflow.com/a/76108416/183934

from msbuild.sdk.sqlproj.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.