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)??
Hmmm.... classic catch-22 - any way out of this??
The only way I found to solve this problem is this:
licenses.licx
in my folder where the solution resideslicenses.licx
over all the existing licenses.licx
in the various projects' Properties
directoryWith 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With