Comments (9)
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.
Can you share your .csproj?
from msbuild.sdk.sqlproj.
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.
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:
Sadly there's no way to force one image version or another in GH actions.
from msbuild.sdk.sqlproj.
This is the spec for the two different images - cannot see any significant diff
from msbuild.sdk.sqlproj.
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 DacpacTool
task (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.
How do you mitigate the parsing issue?
from msbuild.sdk.sqlproj.
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.
@jmezach Wonder if this could be a solution: https://stackoverflow.com/a/76108416/183934
from msbuild.sdk.sqlproj.
Related Issues (20)
- Support for linked servers HOT 5
- Referencing Microsoft.SqlServer.Dacpacs.Master fails HOT 5
- Referencing projects through `.sqlproj` files HOT 2
- Unable to drop tables, functions and procedures HOT 3
- The SDK 'MSBuild.Sdk.SqlProj/2.6.1' specified could not be found HOT 3
- Enable marking individual static analyzer rules as error (instead of warning)
- Latest release notes lack some details (unlike previous) HOT 2
- Error MSB4018: System.NullReferenceException for an OpenJson operation HOT 2
- Add ability to update current rules or bring your own HOT 6
- Problem with CodeAnalysisRules when using ";" (semicolon) HOT 1
- Enable code analysis by default in the templates HOT 2
- SqlServer.Rules has false positive: SRD0200 HOT 1
- SqlServer.Rules has false positive: SRP0020 HOT 1
- Enable analyzer build warnings as errors to be based on a wildcard HOT 5
- Improve .csproj editing experience
- SQLPackage publish is not working in linux, dacpac built with sqlproject have absolute path to referenced dacpacs HOT 2
- After Upgrade to 2.7.x unrelated csharp diagnostic errors for sql code HOT 4
- Schema project is not taken into account during script creation HOT 36
- request: The current SDK bundles target framework '8.0' which is not supported by MSBuild.Sdk.SqlProj. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msbuild.sdk.sqlproj.