Search code examples
reporting-servicesmsbuildtfsbuildsql-server-data-tools

TFS Build Server fails with Reporting Services project


I have a Visual Studio 2015 solution containing a Reporting Services project (*.rptproj) that used to build fine on our TFS Build Server.

I upgraded the solution to Visual Studio 2017, and now it fails during CI builds with the following error:

<Reporting-Services-Project-Path>\<Reporting-Services-Project-Name>.rptproj (57, 11)
The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Reporting Services\Microsoft.ReportingServices.MSBuilder.targets" was not found. Also, tried to find "Reporting Services\Microsoft.ReportingServices.MSBuilder.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.
Process 'msbuild.exe' exited with code '1'.

We are using TFS 2015. I have updated the Visual Studio Build Tools 2017 to the latest version 15.9.6, but that hasn't helped.


Solution

  • The SSDT aren't included in the Visual Studio Build Tools 2017.

    To get the build working it is necessary to manually copy over the required files from your developer PC.

    In my case I copied the Reporting Services folder from C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild on my developer PC to C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild on the build server.

    The build now succeeds.