sql-server-data-toolsbuild-server

How to build .sqlproj projects on a build server?


I have many .sqlproj projects that need to be built on our build server. I don't want to install all of Visual Studio on the build server just so I can install SSDT to build these. How can I build .sqlproj projects without a full VS install?

Here's the raw error I get on the build server when trying to build without SSDT intstalled:

C:\MyProject\MyProj.sqlproj (4): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Solution

  • Answer: Microsoft now has an official NuGet package (see blog post).


    Old answer, prior to August 2016; provided in case the NuGet package doesn't work for you:

    1. Install dacframework.msi (x86|x64)
    2. Install SQLDOM.MSI (x86|x64)
    3. Install SQLLS.MSI (x86|x64)
    4. Install SQLSysClrTypes.msi (x86|x64)
    5. Install SSDTBuildUtilities.msi (from the "Administrator Install Point" as setup in step 3 here)

    Done!

    Source: Headless MSBuild Support for SSDT (*.sqlproj) Projects.