I am using azure devops to deploy a database to a virtual machine via deployment groups. I have verified that the system variable path is correct and also that it works when I log into the virtual machine and try to run it with powershell. I'm not sure why it's not finding it. Any thoughts? Thanks
-
Which agent and task you are using? And have you tried to specify the path of SqlPackage.exe in the agent? https://github.com/Microsoft/azure-pipelines-tasks/issues/4362 – Leo Liu May 01 '20 at 09:34
2 Answers
If someone is looking to resolve this on Azure Release Pipelines and on-prem servers, installing the SSDT from Visual Studio Installer did not help. Had to install the DAC Framework.msi that is mentioned on this link: https://learn.microsoft.com/en-us/sql/tools/sqlpackage-download?view=sql-server-ver15&viewFallbackFrom=sql-server-ver17
After installing it from here, the Microsoft SQL Server DAC item showed up in Registry (on Win 2019 server) and then the release pipeline was able to find the SQLPackage.exe file otherwise even though the sqlpackage.exe file was available and SSDT tools from Visual Studio build tools 2017 and 2019 were there but still there was no registry entry (weirdly). Installing this msi fixed that. Hope it saves someone time.

- 925
- 3
- 10
- 21
-
If you are trying to use the `C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\SqlPackage.exe` try to download the package as @Shiva Naru says and point to folder that the installations creates `"C:\Program Files\Microsoft SQL Server\160\DAC\bin\SqlPackage.exe"` instead. That solved my problem – Rod Ramírez Jul 09 '23 at 21:53