Skip to Content
0
Jun 23, 2020 at 08:39 AM

System.IO.FileLoadException: Could not load file or assembly 'log4net

419 Views Last edit Jun 23, 2020 at 08:01 PM 2 rev

We are using Crystal Report In MVC.NET project refer to this link : to create a PDF file from the data and export it using Crystal Reports in MVC.NET.

https://www.c-sharpcorner.com/article/use-crystal-report-in-mvc-net/

we have this error after exporting report and try to run it :

System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> System.TypeInitializationException: The type initializer for 'CrystalDecisions.Shared.SharedUtils' threw an exception. ---> 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)