Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Infragistics components on build server

I have "inherited" a new (old?) Winforms project and would like to put it onto our build server (Bamboo). That build server has only the absolute minimum (.NET 3.5 and not much more) installed, and we'd like to keep it that way.

As a first step, I extracted all the assembly files (*.dll) for the Infragistics components into a separate directory and referenced them from that local directory (instead of relying on them being installed in the GAC). Works OK.

But when I try to run this build on Bamboo (using MSBuild), I keep getting errors:

Properties\licenses.licx(1): error LC0004: Exception occurred creating type 'Infragistics.Win.UltraWinToolbars.UltraToolbarsManager, Infragistics2.Win.UltraWinToolbars.v7.2, Version=7.2.20072.61, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' System.ComponentModel.LicenseException

After a bit of googling, it seems that those licenses.licx file in the projects are some kind of a licensing scheme to prevent the tools from being installed on several machines.

But how can I get rid of those so that my build server build will work, without installing the full Infragistics component set onto the build server (this is NOT an option)??

  • if I simply delete them from the projects, the build might work (haven't tried yet), but then my design time experience will suffer / not work (which of the two?)
  • having the files around so that my design time experience works prevents the automatic build from running through....

Hmmm.... classic catch-22 - any way out of this??

like image 756
marc_s Avatar asked Jan 15 '10 12:01

marc_s


1 Answers

The only way I found to solve this problem is this:

  • create an absolutely empty (0 byte length) file licenses.licx in my folder where the solution resides
  • during initial stages of the build, the source is extracted from my source repository
  • when the time comes, just before the build begins, I copy this empty licenses.licx over all the existing licenses.licx in the various projects' Properties directory

With this, now I have both my interactive experience working (since the proper licenses.licx files are present), but my automatic build also doesn't break (since that empty licenses.licx file I copied over all the real ones doesn't cause any aborts in the build)

Seems a bit hackish - but it works. Hope that helps someone, somewhere, some day.

Update: I added this BeforeBuild step to my MSBuild build file to copy the empty *.licx file to the locations I need:

<Target Name="BeforeBuild">
   <CreateItem Include="licenses.licx">
       <Output TaskParameter="Include" ItemName="EmptyLicensesLicx" />
   </CreateItem>

   <Copy SourceFiles="@(EmptyLicensesLicx)" 
         DestinationFolder="(your-target-folder-here)" 
         ContinueOnError="true" />

</Target>

Since I need to replace this *.licx file in several places, I actually have several of those <Copy> tasks to achieve my goal.

like image 150
marc_s Avatar answered Jan 21 '23 00:01

marc_s