I have Visual Studio 2012 and Visual Studio 2013 installed on my development machine. My SQL projects were created with VS2013 and they compile fine from Visual Studio, but they fail with the following message when I use MSBuild from the command line:

Build Error: Incompatible versions of SQL Server Data Tools and database runtime components are installed on this computer.

Note: This same error was encountered by other developers in Visual Studio 2012. See This SO question. I have verified that my versions of SSDT are up to date. I am not dealing with the same problem.

1

There are 1 answers

1
Mark Arnott On BEST ANSWER

To resolve this issue you have to make sure you are using MSBuild 12.0 which comes with Visual Studio 2013 not MSBuild 4.0 which ships with the .Net 4.0 framework.

Make sure your path does not include the .Net 4.0 framework and then add MSBuild 12.0 to your path like this:

SET PATH=%PATH%;"%ProgramFiles(x86)%\MSBuild\12.0\Bin"

Another solution is to set the VisualStudioVersion property to 12.0 like this

MSBuild.exe My.sqlproj /p:VisualStudioVersion=12.0

Note: This same error message has appeared in many different versions of SSDT. This fix is specific to Visual Studio 2013