blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

Steve Wright's Blog

Delpoying Reporting Services Reports With MSBuild

I am currently responsible for deploying our project into the test and production environments.  The project has a few reports which need to be installed on a few report servers.  The deployment tool that I am using for the rest of my project is MSBuild so I tried to see if there was a way of getting MSBuild to deploy the reports.  The only method that I found was to write an RS script file which deployed the reports and calls the Exec task to run the RS script. 

So I started outright with RS script as I was not over joyed about writing VB.Net code as I am a C# coder. Then I remembered that MSBuild is customizable as it allows custom tasks to be written.  So I stopped writing my VB.Net code went back C# and created a few tasks that are commonly needed to deploy: AddReportUser, CreateReportFolder, CreateConnectionSoruces, DeployReports and SetReportsDataSource.  The task code was easy to write. I did have to change some of the auto generated code.  I changed the refence.cs file by changing the ReportingService2005 method to accept a string as it called and removed all references to the setting file and app.config.  I also deleted the setting file and app.config that was created by the Visual Studio.

  

I have attached a copy of my report services MSBuild tasks with this post.  Also there is an example MSbuild file to show how to use these tasks.

Published 20 December 2006 10:00 by steve.wright
Attachment(s): MsBuild Reporting Task.zip

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

stevo said:

RE: Steve Wright's "Delpoying Reporting Services Reports With MSBuild"

Hi,

Would love to use your tool but can not get it to work. Any chance of a pointer in the right direction.

I have set ReportFolder :

<ReportFolder>$(MSBuildProjectDirectory)\MaxReports\RDLs</ReportFolder>

and have verified that is resolves correctly :

 <Target Name="DeployReports">

   <!--This will upload the reports to folder name-->

   <Message Text="  $(ReportFolder) " Importance="high"/>

It does correctly resolve to the folder in which al lthe RDL files exist. In my case :

"C:\MaxIGS\TeamBuildTypes\MaxRep.Build.Dev.Branch\MaxReports\RDLs"

When I run the MSBuild.exe with the BuildProject file I then get this :

"The path of the item '/C:\MaxIGS\TeamBuildTypes\MaxRep.Build.Dev.Branch\MaxReports\RDLs' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash."

Any suggestions ?

I am running in native mode and all services are running on the same machine (sql,reporting serviecs, build, everything)

August 2, 2007 03:25
 

steve.wright said:

Hi Stevo

I would look like that you are using the $(ReportFolder) property as destation for where the reports should be uploaded to on the report server.  I used $(ReportFolder) as the location files store on computer so it could be used in my report files list.

If you wish to use $(ReportFolder) property for the destaion to where the reports should be load then it would need to be something like /MaxReports

Regards
Steven Wright

September 10, 2007 13:17

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server (Personal Edition), by Telligent Systems