最近,我的任务是向一个旧的WPF应用程序添加一个报告。该过程的一部分涉及将ActiveReports添加到所讨论的解决方案中。
在我的本地机器上实现并测试了报告之后,是时候将它提交到我们的Dev/ tested环境中了。一切都进行得很顺利,直到我试图在一台没有安装和授权ActiveReports的机器上运行应用程序--我得到了“查看器需要被许可的错误窗口”。
不过,这是事情变得混乱的地方。应该能用的。
首先,我在运行ActiveReports 8.0.133.0
。
我的licenses.licx
文件的内容如下:
GrapeCity.ActiveReports.SectionReport, GrapeCity.ActiveReports.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
我已经为WPF项目的可执行文件生成了一个卫星许可DLL,并确保它被引用并设置为Copy Local = true
。(I've already dealt with this in the past.)
尽管这不是一个web项目,但为了安全起见,我使用了WebKey生成器,并在app.config
文件中添加了一个Active Report 8 Developer
密钥。
不过,它变得更有趣了。当我将以下行添加到我的licenses.licx
文件时,正如我上面看到的错误窗口所建议的那样,我应该这样做:
GrapeCity.ActiveReports.Viewer.Win.Viewer, GrapeCity.ActiveReports.Viewer.Win.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
GrapeCity.ActiveReports.Viewer.Wpf.Viewer, GrapeCity.ActiveReports.Viewer.Wpf.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
当我试图简单地在Dev中构建项目时,生成会失败,其中包含以下消息:
[10:29:34] [exec] (CompileLicxFiles target) ->
[10:29:34] [exec] Properties\licenses.licx(2): error LC0004: Exception occurred creating type 'GrapeCity.ActiveReports.Viewer.Win.Viewer, GrapeCity.ActiveReports.Viewer.Win.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff' System.ComponentModel.LicenseException: License cannot be confirmed. Error code: 01-001 [C:\CheckoutDirectory\Project\[(0) BUILD]\UI\UI.csproj]
[10:29:34] [exec] Properties\licenses.licx(3): error LC0004: Exception occurred creating type 'GrapeCity.ActiveReports.Viewer.Wpf.Viewer, GrapeCity.ActiveReports.Viewer.Wpf.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff' System.ComponentModel.LicenseException: License cannot be confirmed. Error code: 01-001 [C:\CheckoutDirectory\Project\[(0) BUILD]\UI\UI.csproj]
对于那些不想滚动的人:
System.ComponentModel.LicenseException: License cannot be confirmed. Error code: 01-001
最终的结果是一种莫顿的恶行。要么我可以构建应用程序,但我不能运行报告(这是我做这些改变的一点),或者我根本无法构建这个应用程序。
问题:如何使报表查看器在没有许可证异常的情况下运行并保持应用程序的构建?我也应该注意到,我在一个很短的最后期限与此!
发布于 2014-12-23 17:59:25
我添加Win和WPF查看器行是正确的;结果是使用Active Reports 8升级构建服务器。从那里开始,一切都进行得很顺利。
TL;DR -升级所有需要升级的东西!
https://stackoverflow.com/questions/27624661
复制相似问题