问题描述
我在同一台服务器上运行了一些Web应用程序。最近,我为VS 2010添加了水晶报表。我想将新报表用于几个项目,但不是全部。其他项目使用的是较旧版本的Crystal Reports
I have a few web applications running on the same server. Recently I added crystal reports for VS 2010. I thought to use new reports for several of projects but not all. Other projects uses the older version of crystal reports
因此,我修改了所需项目的web.config。我在开发机器和服务器上都下载了运行时。所以现在我在GAC中有两种版本的驴子(v 10和v 13)。我在两个机器上也都装有.NET 4.0。
So I modified the web.config of the required projects. I downloaded runtime on both my development machine and server. So now I have both versions of asseblies (v 10 and v 13) in GAC. I have .NET 4.0 on both macines as well.
它已在开发机上工作
但是,何时我在服务器上运行相同的项目,这会引发错误。
However, when I run the same projects on server it raises an error.
CS0433:类型'CrystalDecisions.CrystalReports.Engine.ReportClass'同时存在于'c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine 0.510.5.3700.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll'和'c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\13.0.2000.0__692fbea5521e1304\CrystalDecisions.CrystalReports。 dll'
CS0433: The type 'CrystalDecisions.CrystalReports.Engine.ReportClass' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\10.5.3700.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\13.0.2000.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll'
我想知道为什么它可以在我的开发机器上运行而不能在服务器上运行?我是否必须在服务器上配置某些东西才能实现?还是我需要在web.config文件中添加内容?
I am wondering why it works on my development machine and does not on server ? Do I have to configure something on server to make it happen ? Or do I need to add in someting in web.config file ?
如果有人知道,请告诉我。
If someknow knows it, please let me know.
预先感谢您的帮助。
推荐答案
我遇到了同样的问题,并通过注释/删除程序集引用来解决此问题。指的是web.config中的10.5 ....版本。另外,我必须手动更改正确的版本,才能在使用Crystal Report组件的.aspx文件中注册assembly = CrystalDecision ....。
I had the same problem and fixed it by commenting/deleting assembly references which refer to version 10.5.... in web.config. In addition I had to change manually correct version to register assembly="CrystalDecision.... in the .aspx file where I use Crystal report components.
这篇关于在同一服务器上使用不同版本的Crystal Reports的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!