Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Report Designer 2015 Not Building to Target Server Version Correctly

I have an SSRS report project I'm working on in Visual Studio 2015, and I am unable to deploy my reports to the correct target server version.

The reports need to be able to deploy and run on SQL Server 2012, 2014 and 2016. Visual Studio 2015 allows for a Target Server Version option for the project of 2008R2, 2012, or 2014, which is what the target server version of the project is set to. The designer automatically upgraded the source RDL file schema to the 2016 version of the report once you open and do anything within it. I understand this part is by design.

The problem comes when you build the report. The build output files in the \bin\Debug or \bin\Release folders are not targeted to the correct server version. The following tag looks like it updates correctly in the output files:

<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

However, the build fails to remove and leaves behind all of the other SSRS 2016 tags within the built RDL files, and as such cannot be deployed to SSRS 2012 or 2014.

I have Visual Studio 2015 v 14.0.25431.01 installed with SQL Server Data Tools v14.0.60812.0 with SQL Server Reporting Services 13.0.1700.68.

Is there something that I'm missing that needs to be done as well besides setting Target Server Version to "2008R2, 2012, or 2014" to get it to build to the correct Target Server Version?

like image 349
mcol2007 Avatar asked Oct 30 '22 18:10

mcol2007


1 Answers

I had this same problem. What I needed to do to resolve this was

  • Clean the project
  • Under Project > Properties > General set TargetServerVersion to "SQL Server 2008"

  • Set TargetServerVersion to "SQL Server 2008 R2, 2012 or 2014"

  • Rebuild the project

Your project should now deploy to the correct version

like image 99
Chris Stillwell Avatar answered Jan 02 '23 19:01

Chris Stillwell