Missing values for the following SqlCmd variables DACPAC

Hello.
I’m trying to set up deploy of MSSQL database using SQL - Deploy DACPAC step.
My project has SQLCMD variable that looks like:


In my SQL - Deploy DACPAC step I have next record in Variables section:

But every time I get the same error:
Deployment cannot continue. —> Microsoft.Data.Tools.Schema.Sql.Deployment.DeploymentFailedException: Missing values for the following SqlCmd variables:Finlock.
I’m out of ideas.
Please, help :slight_smile:

Hi Pavel,

Thanks for getting in touch! I suspect the missing piece is to pass the variable to your DacPac deployment. As outlined in this guide from the community, you can accomplish this “via a variables dictionary in the DacPac options” with:

$options.SqlCommandVariableValues.Add("FinLock", $FinLock)

Does that guide help you get up and running? Let me know how you go or if you have any further questions moving forward. :slight_smile:

Best regards,

Kenny

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.