How to build SSRS reports (rptproj) with TeamCity and Visual Studio 2015
Asked Answered
S

1

3

We have a build step to build a solution with about 70 projects using the Visual Studio (sln) as the runner type. We are able to successfully build other projects that are not supported by MSBuild, such as a vdproj file and office plug-ins by doing this. However, it apparently does not work for SSDT/SSRS projects. I have made sure the latest version of SSDT is installed to Visual Studio, and Visual Studio 2015 is directly on the build server.

rptproj is not supported by MSBuild and cannot be built

Is there any thing else I need to do to get these to build correctly? I have read about some people moving them to their own solution but that is not what we are after here, and I'm not sure that really is a fix to the problem.

This is important for us because we require the build output which targets SQL 2008 instead of copying the RDL's directly in the project which are the tooling version (SQL 2016).

Sentimental answered 7/9, 2016 at 13:50 Comment(0)
D
5

You have to build the rptproj by calling Visual Studio executable (devenv.exe):

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" "[fullpath]\FooBarSolution.sln" /Rebuild [SolutionConfiguration] /Project KPI /Log "[fullpath]\Logs\KPI.Build.Log.log" /Out "[fullpath]\Logs\KPI.Build.Out.log"

Also you have to set the TargetServerVersion property of the project to SQL Server 2008

enter image description here

Decrease answered 8/9, 2016 at 7:14 Comment(3)
That is how we have everything setup currently. The Visual Studio SLN runner in TeamCity calls devenv.com/exe and our target version is already 2008. The issue is that when building via TeamCity is still thinks the rptproj files are not supported via MSBuild, even though we are not using MSBuild.Sentimental
I looked into this further today after your post - I didn't realize that the Visual Studio (SLN) build runner actually still calls MSBuild.exe. I did use a command line instead and called devenv.com (devenv.exe hangs builds due to the UI prompts it can generate). Problem solved - thank you for the extra insight.Sentimental
it's worth noting that devenv.exe runs silently, where devenv.com sends build output to the console.Mariande

© 2022 - 2024 — McMap. All rights reserved.