I have a SQL Server 2008 Database Project that I'm attempting to deploy using Visual Studio 2010. When I click deploy, the build works fine, but after it creates the deployment script and begins to execute it, I get the following errors:
Error 8 SQL80001: 'DatabaseName' is not a recognized option.
Error 7 SQL80001: Incorrect syntax near ':'.
Looking at the deployment script, it has the following lines:
:setvar DatabaseName "DEV_DB"
...
GO
:on error exit
So it looks like SQL Server is not running the deployment script in SQLCMD mode to understand that syntax. If I'm copying and pasting into SSMS, I can set that option, but I want to deploy straight from Visual Studio. Where is the setting to have VS run this script in SQLCMD mode OR How can I set the script to not generate using SQLCMD syntax?
Thanks.