SAP Knowledge Base Article - Public

1544693 - Error BC30560: 'CrystalReportViewer' is ambiguous in the namespace 'CrystalDecisions.Web'

Symptom

  • Compiling a new Web application in Visual Studio 2010 and using the Crystal Reports for Visual Studio 2010 web viewer
  • The 10.5.3700.0 assembly is referenced in the Register tag instead of 13.0.2000.0:

<%@ Register Assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

  • Also, the incorrect references are added to the web.config when adding the CrystalReportViewer
  • The following references are incorrect:
    •  CrystalDecisions.Shared, 10.5.3700
    •  CrystalDecisions.ReportSource, 10.5.3700
    •  CrystalDecisions.CrystalReports.Engine, 10.5.3700

Environment

  • Visual Studio 2008
  • Visual Studio 2010
  • Crystal Reports for Visual Studio 2010

Reproducing the Issue

  1. Install Visual Studio 2008
  2. Install Visual Studio 2010 on the same computer
  3. Install Crystal Reports for Visual Studio 2010
  4. Create a new Web project using Visual Studio 2010

Cause

  • This is a Microsoft (MS) issue in the multi-targeting infrastructure
  • MS fix ETA - Unknown

Resolution

  • Work-around; remove the following from the web.config:

<add assembly="CrystalDecisions.Shared, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=10.5.3700.0, Culture=neutral,
PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=13.0.2000.0, Culture=neutral,
PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.2000.0, Culture=neutral,
PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=10.5.3700.0, Culture=neutral,
PublicKeyToken=692FBEA5521E1304"/>

  • In the code behind, replace the following:

<%@ Register Assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

  • With:

<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

Keywords

CRVS CR4VS 2010 2012 log 4 net LOG4NET , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Problem

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio