Archive

Crystal reports error on preview.aspx

Some random errors showed up when compiling a .NET 4 web project that contained Crystal Reports for .NET:

Error  Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. aspnet_client/system_web/4_0_30319/crystalreportviewers13/preview.aspx 
Error  Could not load file or assembly 'CrystalDecisions.ReportAppServer.Controllers, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. aspnet_client/system_web/4_0_30319/crystalreportviewers13/preview.aspx 

Error  Could not load file or assembly 'CrystalDecisions.ReportAppServer.ObjectFactory, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. aspnet_client/system_web/4_0_30319/crystalreportviewers13/preview.aspx 

Error  Could not load file or assembly 'CrystalDecisions.ReportAppServer.XmlSerialize, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. aspnet_client/system_web/4_0_30319/crystalreportviewers13/preview.aspx 

Delete all the files in this folder:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\ASP.NETClientFiles\crystalreportviewers13