Closed jackliusr closed 8 months ago
@ErikEJ I guess you meant me :D I could do a PR but I have the same question about the version number. Also the script seems to be unable to locate sqlpackage.exe if it was installed via dotnet tool install
. Maybe it would be easier to just take it from an env var? Pipeline Task users could easily change it if they want to use another version.
Btw I opened an issue in the relevant repo https://github.com/microsoft/azure-pipelines-extensions/issues/1225
Hey folks, I'm struggling to work out what the issue is here in order to resolve it 😄
I have a GitHub Action workflow failing with this error:
The Element or Annotation class SqlIndex does not contain the Property class Online.
At line:97891 char:9
+ throw $records[0]
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], Exception
+ FullyQualifiedErrorId : dbatools_Publish-DbaDacPackage
Reading through this conversation it seems like it's a mismatch in version of dacfx and sqlpackage.exe? However, I am using the windows-latest
image for the runner, the list of installed software states that this includes DacFx 162.2.111.2
and I'm using the latest dbatools module (Publish-DbaDacPackage
) which has SqlPackage.exe version 162.2.111.2
I have tried to use the previous version of dbatools\dbatools.library but this gives me the same error.
What am I missing? Thanks in advance!
@jpomfret - if you add a script step that calls sqlpackage /version, does it return 162.2.111? Checking the dba tools code quick, I think it uses the msbuild nuget instead of sqlpackage itself - https://github.com/dataplat/dbatools/blob/86b3f3db92ab8f2f6ebab4259d47f7da158a748c/public/Publish-DbaDacPackage.ps1#L69 that nuget package is uh, not updated.
hey @dzsquared
Really sorry I got side tracked on this - when I run sqlpackage /version
I get the following:
sqlpackage : The term 'sqlpackage' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At D:\a\_temp\cd2d7e43-4e35-4661-b3fd-6f6a022cd6d2.ps1:8 char:1
I think that dbatools uses the sqlpackage from the library module - but I'm not exactly sure how this works 🤔 I'll reach out to Chrissy on this too.. https://github.com/dataplat/dbatools.library
This topic shouldn't be closed. Visual Studio contains a new version of dacfx then https://aka.ms/dacfx-msi
I had to copy this directory for deployment: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\ because I couldn't find a standalone download
Steps to Reproduce:
(DacFx/SqlPackage/SSMS/Azure Data Studio)