##[error]Unable to find the location of Dac Framework (SqlPackage.exe) from registry on

See original GitHub issue

Question, Bug, or Feature?
Type: Bug

Enter Task Name: SqlAzureDacpacDeployment@1

list here (V# not needed):
https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/SqlAzureDacpacDeploymentV1/README.md

Environment

  • Server - Azure Pipelines or TFS on-premises?

    • If using TFS on-premises, provide the version:

    • If using Azure Pipelines, provide the account name, team project name, build definition name/build number:

  • Agent - Private:

Issue Description

Our builds have started failing recently at dacpac deployment step. Previously all builds were running successfully and there are no changes in the build pipeline. It seems dacpac deployment component has changed. The only difference in the successful builds and failing builds is the Azure SQL Database deployment version change from 1.202.0 to 1.209.0. This is the task configuration: image Is there any change expected with the new version of Azure SQL Database deployment component? And which VS version does it expects to be present in the build agent? Currently we are having Microsoft Visual Studio\2019 installed on the agents.

Task logs

"D:\a\_work\1\b\2\_work\_tasks\SqlAzureDacpacDeployment_ce85a08b-a538-4d2b-8589-1d37a9ab970f\1.209.0\vswhere.exe" -version [15.0,18.0) -latest -format json ##[error]Unable to find the location of Dac Framework (SqlPackage.exe) from registry on machine 7d8c7c86c000000Check out how to troubleshoot failures at https://aka.ms/sqlazuredeployreadme#troubleshooting- [Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

image

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Kittoes0124commented, Sep 20, 2022

This is due to some yet to be determined issue with the detection of the DacFx framework after bumping the Visual Studio version check to support VS2022. On self-hosted agents, the issue can be resolved by installing the framework manually (we used https://aka.ms/dacfx-msi, sourced from here).

0reactions
msjfcommented, Sep 28, 2022

The fix is to consider multiple places for the dac pac installation to be and to fallback to previous versions of visual studio.

The code already does so. I didn’t write any of it, unless you count bumping a 17 to an 18, but am going to guess that something breaks down within this block.

For me, the “-latest” of vswhere invocation only returns information fro VS2022, while we may want to fallback to 2019, 2017 … or whichever version is installed on the machines.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Devops Unable to find the location of Dac ...
... SQL Server DAC item showed up in Registry (on Win 2019 server) and then the release pipeline was able to find the...
Read more >
Unable to find Dac Framework (SqlPackage.exe) - MSDN
I checked the location (C:\Program Files (x86)\Microsoft SQL Server) where the sqlpackage.exe would be located. The subdirectories under C:\ ...
Read more >
visual studio 2019 - unable to deploy dacpac due to missing ...
Unable to do any dacpac deployment since C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\SqlPackage.exe doesn't exists!
Read more >
Public/FindSqlPackagePath.ps1 1.1.0.130
Write-Verbose "Unable to find the location of Dac Framework (SqlPackage.exe) from registry on machine $env:COMPUTERNAME" } return $dacPath
Read more >
Getting SQLPackage.exe on VMSS Agent Pool : r/AZURE
2022-12-15T16:44:40.5357999Z ##[error]Unable to find the location of Dac Framework (SqlPackage.exe) from registry on machine ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found