无法在Azure DevOps CD上部署DacPac [英] Can't deploy DacPac on Azure DevOps CD
问题描述
我正在使用Visual Studio从数据库项目中构建DacPac
文件.另外,在Advanced Build Settings
的调试Drop
"选项卡中,我启用了以下选项:
I am building DacPac
file from a database project using Visual Studio. Also, in the Debug Drop
tab in Advanced Build Settings
, I enabled the following options:
- 请勿删除凭据
- 请勿删除数据库角色
- 请勿删除数据库范围的凭据
- 请勿删除登录名
- 请勿放弃权限
- 请勿删除角色成员资格
- 请勿删除用户
- 请勿删除服务器角色成员身份
仍然,在CD SQL Deploy中出现以下错误:
Still, I get the following error in CD SQL Deploy:
编辑 根据Krzysztof Madej的建议,我提出了以下其他论点(他们正在另一个项目上工作),但是他提出了论点,对于这些论点,我遇到了这个错误:
EDIT based on the advice of Krzysztof Madej, I have put the following additional arguments (they were working on another project), but for the argument, he proposed and for these ones I got this error:
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.
推荐答案
在AdditionalArgument
中,您必须添加
/p:BlockOnPossibleDataLoss=false
但是请注意,这将删除您的数据.
But be aware that will delete you data.
如果您使用经典版本,它将在这里:
If you use classic release it will be here:
以Yaml
- task: SqlAzureDacpacDeployment@1
displayName: Execute Azure SQL : DacpacTask
inputs:
azureSubscription: '<Azure service connection>'
ServerName: '<Database server name>'
DatabaseName: '<Database name>'
SqlUsername: '<SQL user name>'
SqlPassword: '<SQL user password>'
DacpacFile: '<Location of Dacpac file in $(Build.SourcesDirectory) after compilation>'
additionalArguments: '/p:BlockOnPossibleDataLoss=false'
这篇关于无法在Azure DevOps CD上部署DacPac的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!