You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to me that defining the <SqlCmdVariable> ... </SqlCmdVariable> is actually worse than not defining it.
I am building a .dacpac with this SDK with a Post-Deploy script that uses variables like this:
IF (1= ISNULL($(SQLCMD_DEPLOY_CONFIGS), 0))
BEGIN# ...
END
I am not defining <SqlCmdVariable> ... </SqlCmdVariable> anywhere.
Running sqlpackage.exe /a:Publish ... in a container where the SQLCMD_DEPLOY_CONFIGS environment variable is defined results in the value from the environment variable being replaced in the script.
Running sqlpackage.exe /a:Publish ... /v:SQLCMD_DEPLOY_CONFIGS=0 also works, although it prints "The following SqlCmd variables are not defined in the target scripts: SQLCMD_DEPLOY_CONFIGS."
BUT
If I go and now define:
<SqlCmdVariableInclude="SQLCMD_DEPLOY_CONFIGS">
<!--Defines whether configuration scripts should be deployed: 0 - No, 1 - Yes-->
<DefaultValue>$(SQLCMD_DEPLOY_CONFIGS)</DefaultValue>
<Value>$(SQLCMD_DEPLOY_CONFIGS)</Value>
</SqlCmdVariable>
then the approach with the environment variable (1) no longer works. So to me it seems that it is worse to define the sqlcmd vars?
The text was updated successfully, but these errors were encountered:
It seems to me that defining the
<SqlCmdVariable> ... </SqlCmdVariable>
is actually worse than not defining it.I am building a .dacpac with this SDK with a Post-Deploy script that uses variables like this:
I am not defining
<SqlCmdVariable> ... </SqlCmdVariable>
anywhere.sqlpackage.exe /a:Publish ...
in a container where the SQLCMD_DEPLOY_CONFIGS environment variable is defined results in the value from the environment variable being replaced in the script.sqlpackage.exe /a:Publish ... /v:SQLCMD_DEPLOY_CONFIGS=0
also works, although it prints "The following SqlCmd variables are not defined in the target scripts: SQLCMD_DEPLOY_CONFIGS."BUT
If I go and now define:
then the approach with the environment variable (1) no longer works. So to me it seems that it is worse to define the sqlcmd vars?
The text was updated successfully, but these errors were encountered: