MSBuild – Missing values for the following SqlCmd variables


Today our automated build broke with a strange error:

Missing values for the following SqlCmd variables: DW

We have a couple of references to other databases in our build specifically to deal with warnings thrown by temporary cross database references. One of which is master and the other is another database on the same server:


The build was failing due to the reference to the DW database. I’d removed the reference and added it back in to see if that made a difference, and checked that it matched what was in live, no dice. Still broken.

What I’d overlooked was the project properties. When a new database reference is added it automatically comes with a new SQLCMD variable that you can set, which looks like this:


Having this reference was causing the Build to try and use it, which wasn’t required. Simply removing this variable solved the problem, as our build server already has a copy of the referenced database.


Installing SSDT on Visual Studio 2015


You’d imagine this would be pretty straight forward right? Something like, VS2015 and then install SSDT right? WRONG!

First you need to install VS 2015 and then install the LATEST version of SSDT available here. After this the install should go through OK.

The issue is when you do a <favourite search provider> search for ‘SQL Server Data Tools’ you come to this page and you are offered two options, pick the top one:


Good luck….