.net Crystal Reports 错误:找不到 CrystalDecisions.Windows.Forms 版本 10.2.3600

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1801709/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 13:35:54  来源:igfitidea点击:

Crystal Reports error: cannot find CrystalDecisions.Windows.Forms version 10.2.3600

.netvb.netcrystal-reports

提问by calico-cat

I am refactoring an old program to use VS2008 (instead of VS2005) and the 2003 Crystal Reports merge modules no longer work on the client machine.

我正在重构一个旧程序以使用 VS2008(而不是 VS2005)并且 2003 Crystal Reports 合并模块不再在客户端计算机上工作。

I am using the CR version bundled with VS2008. Neither the CR10 merge modules downloaded from the SAP site work, nor the CR x86 msi.

我使用的是与 VS2008 捆绑的 CR 版本。从 SAP 站点下载的 CR10 合并模块和 CR x86 msi 都不起作用。

Could not load file or assembly 'CrystalDecisions.Windows.Forms, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.

无法加载文件或程序集“CrystalDecisions.Windows.Forms, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304”或其依赖项之一。该系统找不到指定的文件。

I have googled this error to death, and can only find please for help with this exact error...

我已经用谷歌搜索了这个错误,只能找到请帮助解决这个确切的错误......

采纳答案by calico-cat

I've been able to figure it out... finally. (CR experts...please correct me if I've missed details or gotten them wrong)

我已经能够弄清楚了......终于。(CR专家...如果我遗漏了细节或弄错了,请纠正我)

The fact that Business Objects was purchased by SAP in 2007 was a major roadblock to the answer. The vast majority of forum links point to the old Business Objects website, and are no longer available (SAP has decided to unhelpfully point 90% of these to their home page). This vastly reduced the helpfulness of such posts.

SAP 在 2007 年购买了 Business Objects,这一事实是解决这个问题的主要障碍。绝大多数论坛链接指向旧的 Business Objects 网站,并且不再可用(SAP 已决定将其中 90% 的链接指向他们的主页,这毫无帮助)。这大大降低了此类帖子的有用性。

The first source of my confusion was that the version of Crystal Reports that I was dealing with was Crystal Reports BASIC 2008. This is the version bundled with Visual Studio 2008. Versions 11 and 12 are standalone and were NOT what I was looking for.

我感到困惑的第一个来源是我正在处理的 Crystal Reports 版本是 Crystal Reports BASIC 2008。这是与 Visual Studio 2008 捆绑在一起的版本。版本 11 和 12 是独立的,不是我想要的。

I had tried using MSMs (packaged DLLs) and msi (runtime installer) for Crystal Reports 2008 (the standalone version) and this is why it didn't work. I had also tried bundling "Crystal Reports" with the installation by using Prerequisites in my setup program. No luck.

我曾尝试将 MSM(打包的 DLL)和 msi(运行时安装程序)用于 Crystal Reports 2008(独立版本),这就是它不起作用的原因。我还尝试通过在我的安装程序中使用先决条件将“Crystal Reports”与安装捆绑在一起。没运气。

  1. I had first tried moving the DLLs from C:\Program Files\Common Files\Business Objects\2.7\Managed to the BIN directory of my application (or told VS2008 to include them in the bin directory at compile time). It then couldn't find crystaldecisions.reportappserver.commlayer, and no amount of copying and pasting DLLs could fix this.
  2. I then navigated the Global Assembly Cache (c:\WINDOWS\assembly) and noticed that on my development machine, the DLLs were available in the correct version, but were not on the client machine (copying them to the bin folder via DOS gave a version/licensing error).
  3. I then found a hard-to-find zip file that contained the version I needed - but it was the bundle for VS2005! I ended up using the msm file located in cr_net_2005_mergemodules_mlb_x86.zip. I also changed my compilation option from "Any CPU" to "x86". Not sure if this helped as well, but it works now.
  1. 我首先尝试将 DLL 从 C:\Program Files\Common Files\Business Objects\2.7\Managed 移动到我的应用程序的 BIN 目录(或告诉 VS2008 在编译时将它们包含在 bin 目录中)。然后它找不到crystaldecisions.reportappserver.commlayer,并且再多的复制和粘贴DLL 也无法解决这个问题。
  2. 然后我浏览了全局程序集缓存 (c:\WINDOWS\assembly) 并注意到在我的开发机器上,DLL 在正确的版本中可用,但不在客户端机器上(通过 DOS 将它们复制到 bin 文件夹给出了一个版本/许可错误)。
  3. 然后我找到了一个很难找到的 zip 文件,其中包含我需要的版本 - 但它是 VS2005 的包!我最终使用了位于 cr_net_2005_mergemodules_mlb_x86.zip 中的 msm 文件。我还将编译选项从“任何 CPU”更改为“x86”。不确定这是否也有帮助,但它现在有效。

So that was my ordeal. Hopefully this helps someone else!

所以这就是我的磨难。希望这对其他人有帮助!

回答by Ben10

I downloaded the DLLs from herethen referenced to their location and the problem was solved.

我从这里下载了 DLL,然后引用了它们的位置,问题就解决了。

回答by MartW

Your application is clearly keeping references to the CR10 version of Crystal - you need to update these to the newer versions. You can do this by double-clicking on My Project, selecting References, removing the existing Crystal ones (which probably say version 10.2.3600.0 next to them) and replacing them with the matching 11.5 versions. I suggest adding the new ones first, then removing the old ones - that way you can keep track. As long as the functionality you're using hasn't been removed from the newer version (which is unlikely), it'll work fine. After that, you'll be able to use the merge modules included with VS2008 to deploy Crystal.

您的应用程序显然保留了对 CR10 版本的 Crystal 的引用 - 您需要将它们更新到较新的版本。您可以通过双击“我的项目”,选择“引用”,删除现有的 Crystal(可能在它们旁边说版本 10.2.3600.0)并将它们替换为匹配的 11.5 版本来执行此操作。我建议先添加新的,然后删除旧的 - 这样你就可以跟踪。只要您使用的功能没有从新版本中删除(这不太可能),它就可以正常工作。之后,您将能够使用 VS2008 中包含的合并模块来部署 Crystal。

回答by JJ Mandlate

Just add a forms and link it to a new crystalreportviewer, that way you will see the error disappear.

只需添加一个表单并将其链接到新的 Crystalreportviewer,这样您就会看到错误消失。