MSBuild-ing 时的 Infragistics 许可证例外
运行项目的 MSBuild 脚本时,我收到以下错误:
Properties\licenses.licx(1): error LC0004: Exception occurred creating type 'Infragistics.Win.UltraWinEditors.UltraNumericEditor, Infragistics.Win.UltraWinEditors.v5.2, Version=5.2.20052.1028, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' System.ComponentModel.LicenseException: Unable to locate license assembly.
Properties\licenses.licx(2): error LC0004: Exception occurred creating type 'Infragistics.Win.Misc.UltraGridBagLayoutManager, Infragistics.Win.Misc.v5.2, Version=5.2.20052.1028, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' System.ComponentModel.LicenseException: Unable to locate license assembly.
Properties\licenses.licx(3): error LC0004: Exception occurred creating type 'Infragistics.Win.UltraWinEditors.UltraCheckEditor, Infragistics.Win.UltraWinEditors.v5.2, Version=5.2.20052.1028, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' System.ComponentModel.LicenseException: Unable to locate license assembly.
我的计算机的 Infragistics 许可证似乎存在问题。
我的解决方案中有有效的许可证文件,那么是什么导致了此问题?
When running the MSBuild scripts for a project, I'm getting the following errors:
Properties\licenses.licx(1): error LC0004: Exception occurred creating type 'Infragistics.Win.UltraWinEditors.UltraNumericEditor, Infragistics.Win.UltraWinEditors.v5.2, Version=5.2.20052.1028, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' System.ComponentModel.LicenseException: Unable to locate license assembly.
Properties\licenses.licx(2): error LC0004: Exception occurred creating type 'Infragistics.Win.Misc.UltraGridBagLayoutManager, Infragistics.Win.Misc.v5.2, Version=5.2.20052.1028, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' System.ComponentModel.LicenseException: Unable to locate license assembly.
Properties\licenses.licx(3): error LC0004: Exception occurred creating type 'Infragistics.Win.UltraWinEditors.UltraCheckEditor, Infragistics.Win.UltraWinEditors.v5.2, Version=5.2.20052.1028, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' System.ComponentModel.LicenseException: Unable to locate license assembly.
It appears that there's a problem with my machine's Infragistics license.
I have valid license files in my solution, so what's causing this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
有一个更简单的解决方案:将 license.licx 上的构建操作设置为 None。
There is a much easier solution: Set the build action on your license.licx to None.
来自 Infragistics 论坛存档
这是一个解决方法,但不幸的是,这并不能解释根本原因。
这是Infragistics 的博客文章用于处理自动化构建,但我认为这不适合您。进一步参考同一篇文章,在此处添加更多信息。
我想您已经看过这些链接,但它们可能对遇到类似问题的其他人有帮助。
From a user comment in Infragistics forum archive
Here is a workaround but unfortunately, this does not explain the root cause.
Here is a blog post from Infragistics to deal with automated builds but I don't think it is your case. And a further reference to that same post adding more info here.
I guess you had already looked at those links but they might be helpful to somebody else with a similar problem.
只需将构建编译更改为任何 CPU 就容易多了,您就完成了!
它会毫无问题地运行。
it's much easier just to only change the build compilation to any CPU and you're done!
it will run with no problem.
确保许可证编译器 (lc.exe) 可以找到 Infragistics 程序集的位置。另外,如果您最近更新了组件,请确保不存在具有不同版本号的多个副本。最后确保您尝试使用的版本与licenses.licx 文件中的版本相同。
刷新 licenses.licx 的一个简单方法是打开表单设计器,添加 Infragistics 组件并将其删除。
如果由于某种原因,licenses.licx 文件没有刷新,您可以尝试先删除有问题的条目,然后刷新它。
Make sure the license compiler (lc.exe) can find the location of your Infragistics assemblies. Also, if you've updated your components anytime recently make sure there aren't multiple copies with different version numbers lying around. Finally make sure that the version your are trying to use is the same version in the licenses.licx file.
An easy way to refresh the licenses.licx is it open the form designer, add an Infragistics component and remove it.
If for some reason the licenses.licx file doesn't refresh you can try removing the offending entries first then refresh it.
可以通过每次在存储库中找到文件时清除文件内容来解决该问题。
例如,在DevOps管道中的批处理文件中,在获取最新的源代码后,该脚本清空文件的内容。
正如参考站点中提到的,在构建步骤中不需要
licenses.licx
,仅在开发/IDE 阶段需要。It was possible to solve the problem by clearing out the content of the files every time it is found in a repository.
For example, in a batch file in the DevOps pipeline, after getting the latest source code, this script empties the content of the files.
As mentioned in the reference site, the
licenses.licx
is not needed during the build step, only needed during the development/IDE phase.