构建服务器上的基础设施组件 [英] Infragistics components on build server

查看:146
本文介绍了构建服务器上的基础设施组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经继承"了一个新的(旧的?)Winforms项目,并希望将其放到我们的构建服务器(Bamboo)上.该构建服务器仅安装了绝对最低版本(.NET 3.5,但没有更多),我们希望保持这种状态.

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.

第一步,我将Infragistics组件的所有程序集文件(* .dll)提取到一个单独的目录中,并从该本地目录中引用它们(而不是依靠将它们安装在GAC中).可以.

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.

但是当我尝试在Bamboo上运行此版本(使用MSBuild)时,我总是收到错误消息:

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

Properties \ licenses.licx(1):错误 LC0004:发生异常创建 类型 'Infragistics.Win.UltraWinToolbars.UltraToolbarsManager, Infragistics2.Win.UltraWinToolbars.v7.2, 版本= 7.2.20072.61,文化=中性, PublicKeyToken = 7dd5c3163f2cd0cb' System.ComponentModel.LicenseException

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

经过一番谷歌搜索,看来项目中的licenses.licx文件是某种许可方案,可以防止将这些工具安装在多台计算机上.

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.

但是我该如何摆脱这些麻烦,以便构建服务器构建工作,无需将完整的Infragistics组件集安装到构建服务器上(这不是选项)?

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:

  • 在解决方案所在的文件夹中创建一个绝对为空(0字节长)的文件licenses.licx
  • 在构建的初始阶段,从我的源代码存储库中提取了源代码
  • 时间到了,就在构建开始之前,我将这个空的licenses.licx复制到各个项目的Properties目录中的所有现有licenses.licx
  • 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

有了这个,我现在有了两种互动的经验(因为存在正确的licenses.licx文件),但是我的自动构建也没有中断(因为我将空的licenses.licx文件复制到了所有真实文件中)不会导致构建中止)

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.

更新:我将此BeforeBuild步骤添加到了MSBuild构建文件中,以将空的*.licx文件复制到我需要的位置:

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>

由于我需要在多个位置替换此* .licx文件,因此实际上我有几个<Copy>任务可以实现我的目标.

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

这篇关于构建服务器上的基础设施组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆