Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am getting "unrecognized tag prefix CR" warning when I compile the code. When I run the solution I am getting below error.

Could not load file or assembly 'log4net, Version=1.2.10.0,
Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

<cr:crystalreportviewer id="myCrystalReportViewer" runat="server" autodatabind="true" hascrystallogo="False" width="650px" height="120px" borderstyle="Solid" tooltip="Report Viewer">


Assembly Load Trace: The following information can be helpful to determine why the assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' could not be loaded.

WRN: Assembly binding logging is turned OFF.


Thanks.

What I have tried:

I have added below code in the report.aspx and web.config file:

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


Web.config:
<pages>
<controls>
<add tagprefix="CR" namespace="CrystalDecisions.Web" assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304">
Posted
Comments
Richard Deeming 18-Nov-19 15:02pm    
Fix the Could not load file or assembly 'log4net error first. That might resolve the "unrecognized tag prefix" warning at the same time.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900