My publish attempts are failing with this error
Msg 205, Level 16, State 1, Line 7572 All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists.
Taking the old-school advice to print status messages between deployment script execution, I have narrowed it down to this:
The line number mismatches because of SQL Server quirks, which is why you have to PRINT
stuff like a heathen (see the link above)
Note how there were literally no statements executed. I also had a verbose trace running which confirms that nothing was executed:
How could the control flow statements between two PRINT
statements possibly cause an error?!