4

通过单击一次将 VS2003 1.1 windows 窗体应用程序更新到 VS2010,我们还必须升级应用程序中使用的水晶报表的版本。

如果用户有本地管理员,一切都会完美运行。不幸的是,我们的大多数用户都处于极度锁定状态,无法安装任何东西。这给安装 CR13 二进制文件带来了问题。在单击设置中,我已将所有 CrystalDecisions.* dll 标记为包含/必需,但它们没有发布到部署文件夹,因此没有复制到具有其他 3rd 方库的用户计算机。这意味着应用程序可以正常启动,但是一旦用户尝试运行报告,他们就会收到以下错误:

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.Windows.Forms, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
File name: 'CrystalDecisions.Windows.Forms, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'

即使它被标记为包含/必需,这个文件也没有被部署。我真的不想追逐每个用户并手动安装它(我们没有选择进行组策略推送)。我们使用了四个 Crystal dll:

  • CrystalDecisions.CrystalReports.Engine
  • CrystalDecisions.ReportSource
  • CrystalDecisions.Shared
  • CrystalDecisions.Windows.Forms

其中,实际上只有引擎正在部署!有谁知道为什么 click-once 没有部署其他的(尤其是 Windows Forms dll)以及我如何说服它?

谢谢!

编辑:尝试删除对 Crystal dll 的现有引用(指向“C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet”下的 Crystal 安装),将它们复制到项目中并通过“浏览”选项卡添加它们,但它们仍然没有被部署:(这几乎就像他们设置了一个标志说它们不应该被部署,所以 Visual Studio 只是忽略它们??

4

1 回答 1

3

I manage a major ClickOnce project that also uses the Crystal Reports engine for generating PDF documents.

I believe what you are trying to do is, technically, against the Crystal Reports terms of service. Instead, you must have the users install the latest version of the distributable Crystal Reports runtime as a prerequisite. Yes, I understand that this is a HUGE inconvenience but it is the only solution to this problem.

Were you trying to install the CR runtime by using the ClickOnce prerequisite or were you trying to bundle an installer with your app? You will want to use the latest, ClickOnce installation package, which is available on this page, from the SAP site. I could be wrong, but I think that your users may be able to install the runtime without admin privileges if you install it via the ClickOnce auto-installer for prereqs.

From my experience if you are deploying a robust application that needs to have multiple prerequisites installed on a user's application, someone with admin rights should install your prerequisites. This is not always a requirement but it can save a lot of headaches in the future.

于 2011-06-23T15:27:07.497 回答