2

I cannot realize what I did wrong and find something in the Internet.
Does anybody knows what the reason for the following deploy stopper?

Possibly this is those numerous settings of DacPac bublishing.

Error SQL72014: SQL Execution error: A fatal error occurred. The variable DatabaseName could not be found.
Error SQL72045: Script execution error.  The executed script:
USE [$(DatabaseName)];


Error SQL72014: SQL Execution error: A fatal error occurred. Incorrect syntax was encountered while USE [$(DatabaseName)]; was being parsed.
Error SQL72045: Script execution error.  The executed script:
USE [$(DatabaseName)];
it3xl
  • 2,372
  • 27
  • 37

1 Answers1

2

Set "CommentOutSetVarDeclarations" to false or delete it in XML.

For Visual Studio UI:
Publish Database (PopUp) -> Advanced... (button) -> General (Tab) ->
uncheck the Comment out SetVar declarations

By chance, I clicked on it.

And yet I found it: https://stackoverflow.com/a/15158985/390940 ))

it3xl
  • 2,372
  • 27
  • 37