我正在建设 DacPac
文件,使用Visual Studio从数据库项目中提取。另外,在Debug Drop
标签 Advanced Build Settings
我启用了以下选项。
EDIT根据Krzysztof Madej的建议,我已经把下面的附加参数(他们在另一个项目上工作),但对于参数,他提出,对于这些,我得到了这个错误。
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
但要注意,这将删除你的数据。
如果你使用经典版本,它将在这里。
在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'