TFS Build Server fails with Reporting Services project
Asked Answered
C

1

7

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.

Coaster answered 1/2, 2019 at 1:17 Comment(0)
C
10

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.

Coaster answered 1/2, 2019 at 1:43 Comment(1)
Even if you install the "Data storage and processing build tools" workload, which includes "SQL Server Data Tools - Build Tools", it still doesn't work. Copying this folder was the only way I could find to get it working.Dogma

© 2022 - 2024 — McMap. All rights reserved.