PUpskill
PUpskill

Reputation: 51

Azure SQL Dacpac deployment failing

Azure SQL Dacpac deployment failing with below error.

##[error]*** An error occurred during deployment plan generation. Deployment cannot continue. ##[error]The Element or Annotation class SqlIndex does not contain the Property class Online. ##[error]The Azure SQL DACPAC task failed. SqlPackage.exe exited with code 1.Check out how to troubleshoot failures at https://aka.ms/sqlazuredeployreadme#troubleshooting-

We are using SqlAzureDacpacDeployment@1 task in pipeline.

Upvotes: 3

Views: 2427

Answers (2)

deadlydog
deadlydog

Reputation: 24374

We run our SQL DB deployments from our on-prem build servers, and I was getting this same error. Updating to the latest version of Visual Studio 2022 (currently v17.11.5) on the build server fixed this issue for us. I assume it also updated the SqlPackage.exe. The OP did not mention if they were using on-prem agents or not, so I thought I'd add this answer for those that are.

I'll also mention that this issue has been raised on GitHub here and on the VS forums here, if you want more info.

Upvotes: 0

Josh
Josh

Reputation: 10604

Just ran into this. You need to update the latest SqlPackage with the DacFramework.msi installer https://aka.ms/dacfx-msi and execute SqlPackage.exe from the c:\Program Files\Microsoft SQL Server\160\DAC\bin folder.

Upvotes: 2

Related Questions