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).
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
来源:https://stackoverflow.com/questions/39371766/how-to-build-ssrs-reports-rptproj-with-teamcity-and-visual-studio-2015