Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing values for the following SqlCmd variables:Path1 Path2

I get the error

Missing values for the following SqlCmd variables:Path1 Path2.

in a few Sql Projects in Visual Studio.

I tried googleling it but found nothing.

like image 262
user1450824 Avatar asked Jul 15 '12 18:07

user1450824


3 Answers

I hit this issue. I'd added some SQLCMD variables then deleted them. The SQLCMD variables no longer existed in the publish files or the .sqlproj file. I grepped all the files in the project and the variables didn't exist anywhere. I'd restarted Visual Studio. However I was still getting the Missing values for the following SqlCmd variables: error.

From the project directory I deleted the *.dbmdl and *.sqlproj.vspcc files. The project then published successfully.

like image 170
Giles Roberts Avatar answered Sep 24 '22 06:09

Giles Roberts


Select the SQL project. Go to project's properties (ALT + Enter). Navigate to SQLCMD Variables and act accordingly (either remove the variables or fill in the default values).

like image 36
Jimi Avatar answered Sep 24 '22 06:09

Jimi


I ran in to this yesterday after tinkering with the project settings for my database project (right-click the database project, click properties, then click the Project Settings).

I had checked the Create script (.sql file) option and things continued to work as normal for me. But when another team member checked out the the latest update, they could not build and got the error about missing values for SqlCmd variables. Things still worked for me though until I checked out a fresh version of the source and started getting the same error.

To fix, I simply unchecked the Create script (.sql file) setting and all was well again.

like image 31
Stephen Kennedy Avatar answered Sep 23 '22 06:09

Stephen Kennedy