Reporting Services 2005 MSBuild Tasks#

File Attachment: ReportingServicesTasks.zip (74 KB)

Scenario:  Moving Reports from a QA environment to Production Staged environment to Production.

The last thing I really wanted to do was deploy reports again from Visual Studio to other environments.  Once everything gets the thumbs up in the QA I want to move exactly what was on QA to the Production Staged environment.

All of the tasks are for moving between two instances of reporting services.  The included tasks are:

  • CopyDataSource
  • CopyFolder
  • CopyReport
  • CopyResource
  • CreateFolder
  • DeleteItem
  • ItemExists
  • UpdateDataSource

Some of the tasks exist just support others.  Like CopyDataSource, CopyReport, CopyResource all exist to support the CopyFolder task.  The tasks that I use to move between different environments are DeleteFolder, CreateFolder, CopyFolder and UpdateDataSource.  An example of how these are used is below and there is also an example file in the download.

<Project DefaultTargets="CopyReportsStaged" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 <UsingTask TaskName="ReportingServicesTasks.CopyFolder" AssemblyFile="$(MSBuildProjectDirectory)\bin\ReportingServicesTasks.dll" />
 <UsingTask TaskName="ReportingServicesTasks.CreateFolder" AssemblyFile="$(MSBuildProjectDirectory)\bin\ReportingServicesTasks.dll" />
 <UsingTask TaskName="ReportingServicesTasks.DeleteItem" AssemblyFile="$(MSBuildProjectDirectory)\bin\ReportingServicesTasks.dll" />
 <UsingTask TaskName="ReportingServicesTasks.UpdateDataSource" AssemblyFile="$(MSBuildProjectDirectory)\bin\ReportingServicesTasks.dll" />
 
 <Target Name="CopyReportsStaged">
  <!-- Delete anything that may exist on staged -->
  <DeleteItem
   ReportServerUrl="
http://StagingServer/ReportServer/ReportService2005.asmx"
   ItemName="TestReportsFolder" />

  <CreateFolder
   ReportServerUrl="
http://StagingServer/ReportServer/ReportService2005.asmx"
   Folder="TestReportsFolder"
   ParentFolder="/" />
  
  <CopyFolder
   ReportServerUrl="
http://QAServer/ReportServer/ReportService2005.asmx"
   CopyToReportServerUrl="
http://StagingServer/ReportServer/ReportService2005.asmx"
   CopyFromPath="/TestReportsFolder"
   CopyToPath="/TestReportsFolder" />

  <UpdateDataSource
   ReportServerUrl="
http://StagingServer/ReportServer/ReportService2005.asmx"
   DataSourceName="/DataSources/XMLDataSource1"
   ConnectionString="
http://Server1/StagedWebService.asmx" />
 </Target>
</Project>

  These tasks may someday show up in an opensource project but since I don’t have the time right now to do that I wanted to at least get them out here to maybe save some people time.

Saturday, November 25, 2006 4:28:07 PM (GMT Standard Time, UTC+00:00) #    Comments [0]  | 

 

ClickOnce MSBuild Resigning Task#

File Attachment: ClickOnceTasks.zip (11 KB)

Leveraging the code that MS Patterns and Practices released for ClickOnce I made a MSBuild task to resign a ClickOnce deployment.

Scenario:  Moving a ClickOnce deployment from a QA environment to a Production Staged then again to Production.

A ClickOnce deployment must be resigned if files are changed, say the download URL and/or the client configuration file change.  Using this MSBuild task I was able to automate the moving of a ClickOnce deployment to different environments.  This task is very simple but got the job done.  An example of the usage is shown below.

<Project DefaultTargets="UpdateClient" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 <UsingTask TaskName="ClickOnceTasks.SaveAndSignManifest" AssemblyFile=".\bin\Debug\MsbuildTest\ClickOnceTasks.dll" />
 
 <Target Name="UpdateClient">
  <SaveAndSignManifest FileName="Example.application" CertPath=".\Example_TemporaryKey.pfx" DeploymentProvider="
http://localhost/ExampleClient/Example.application" />
 </Target>
 
</Project>

The files are first copied and changed to the the new download location then the above tasks is run to resign the ClickOnce deployment. 

Saturday, November 25, 2006 3:41:43 PM (GMT Standard Time, UTC+00:00) #    Comments [0]  | 

 

(opensource == freesource) = false#

This past weekend I happen to be around some people that were working on solving a problem with Apache, Tomcat and MySQL.  I made the smart ass comment that maybe they should think about ditching MySQL.  One of the responses I got back was that you should not have to pay for a database.  I kept my mouth shut and just looked at the fellow and smiled while he was working on the weekend.  Seems like they are paying a lot more for MySQL than other databases on the market having people work overtime and the weekend.

My point is not to say you should always spend money on software nor should you always use open source.  There is a good balance and in my experience if the database is a critical piece of your application then you go with a reliable and scalable one.  This is not to say MySQL is not a good database but for the amount of transactions and replication they are using it for there are better options out there.

Tuesday, November 21, 2006 3:41:17 PM (GMT Standard Time, UTC+00:00) #    Comments [0]  | 

 

The long slow path back from PRK#

The Bad

I have broken bones, split my skull open and have had many stitches with scares to go along with them but this recovery has been by far the hardest.  I have had rusty metal in my eye before and for three days for each eye (six days total) it felt like I had a bucket of metal in each eye.  My eyes almost swelled shut and all I could do was ice them taker drugs and sleep for that time.  For some reason my left eye is taking twice as long to heal and is a week plus behind my right eye.  It gets really annoying having one eye good and one eye bad.  And the kicker is I may have to have this done again in January.

The Good

Pain is almost gone.  After a week and a half of healing my right eye is at 20/15 but still can’t see much out of my left eye.  Being able to go running without glasses is nice (just did that on the treadmill tonight) and I’m really looking forward to skiing.

The Bottom Line

It really comes down to quality of life, this will definitely up mine.  Hiking, back packing, biking, skiing, running and swimming all becomes easier.  What you are really wondering is would I do it again?  Absolutely, pain in the short term for a quality of life increase in the long term is definitely worth it.

Thursday, November 02, 2006 3:25:52 AM (GMT Standard Time, UTC+00:00) #    Comments [0]  | 

 

All content © 2008, John Luif