Visual Studio Database Deployment - Script Does Not Work in SQLCMD Mode

I have a SQL Server 2008 database project that I am trying to deploy using Visual Studio 2010. When I click "deploy", the assembly works fine, but after creating the deployment script and starting to execute it, I get the following errors:

Error 8 SQL80001: "DatabaseName" is not a recognized option.

Error 7 SQL80001: Incorrect syntax next to ::.

Looking at the deployment script, it has the following lines:

: setvar DatabaseName "DEV_DB"

...

GO

: when exiting with an error

, , SQL Server script SQLCMD, . SSMS, , Visual Studio. , VS script SQLCMD . script SQLCMD?

.

+5

All Articles