Search code examples
asp.netcrystal-reportsweb-config

Migrating ASP.NET 2005 to 2008 issue with crystal report reference


The ASP.NET website was developed using VS.NET 2005 version and used Crystal Reports.
Now the same wants to upgrade to VS.NET 2008, but it is showing errors like below:

Error 469 Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. C:\Documents and Settings\Administrator\Desktop\SVSS\ssvs10022010123\Web.Config 29

In the web.config file, the code is written like where this error refers to.

<compilation debug="true">
        <assemblies>
            <add assembly="CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
            <add assembly="CrystalDecisions.ReportSource, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
            <add assembly="CrystalDecisions.Shared, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
            <add assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
            <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
            <add assembly="CrystalDecisions.Enterprise.Framework, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
            <add assembly="CrystalDecisions.Enterprise.InfoStore, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
            <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>

Crystal Reports is already installed (which comes by default with VS2008). Do we need to change the reference?
Please guide me on how to fix this issue.


Solution

  • This is because, the crystal report version is changed in .NET 2008.

    You should replace your old version string with new version like this Version=10.2.3600.0 to Version=10.5.3700.0

    Alternate solution to find the exact version of Crystal report in your system is,

    Right click on Project folder and choose reference. Now select all the crystal reports references and press Ok. It should automatically update the web.config file with correct version. (You can delete the old crystal report reference code in web.config).