How to resolve the conflict of the Crystal Report version and make them work side by side?

I have installed VS-2005 and VS-2010. Since Crystal Reports is available as a separate download for VS-2010, I downloaded and installed it. My old projects were in VS-2010, which uses Crystal Reports version 10.0. New projects are in VS-2010, Crystal Reports version of which is 13.0.

I made a small application in VS-2010 with one report. When I try to run this project, it displays errors:

The type 'CrystalDecisions.Web.CrystalReportViewer' exists in both 'c:\Windows\assembly\GAC_MSIL\CrystalDecisions.Web\10.2.3600.0__692fbea5521e1304\CrystalDecisions.Web.dll' and 'c:\Windows\assembly\GAC_MSIL\CrystalDecisions.Web\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Web.dll' The indirectly-referenced assembly 'BusinessObjects.Licensing.KeycodeDecoder, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' could not be found. This assembly is not required for analysis, however, analysis results could be incomplete. This assembly was referenced by: C:\Windows\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\13.0.2000.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll. 

I cannot remove old Crystal Reports (i.e. version 10). How to make it work side by side and what changes are required in the GAC and web.config files.

+4
source share
1 answer

This is a known issue with Crystal Reports. It doesn't go well with the GAC side by side.

From SAP :

Because each version of Crystal Reports has its own specific runtime that needs to be properly deployed, it is imperative that the deployed runtime be consistent with the Crystal Reports builds for Visual Studio .NET in your project.

Use gacutil /u /f to force the removal of old Crystal Reports assemblies.

If this does not allow you to remove Crystal Reports for Visual Studio 2005.

You can still save projects side-by-side by copying assemblies to a shared folder (for example, ".. \ 3rdParty \ 10.5.3700.0" and make a link to the file in this folder instead of the GAC. The trick is to copy Crystal assemblies Reports from the GAC via commnadline:

 > copy c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\10.5.3700.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll c:\dev\3rdParty\10.5.3700.0 

To find out which assemblies are deployed:

 gacutil /l 

Then you simply delete the copied assemblies from the GAC.

+5
source

Source: https://habr.com/ru/post/1401971/


All Articles