Search code examples
c#crystal-reportslog4netinstallshieldgac

Could not load file or assembly 'log4net'


I am attempting to deploy a Crystal Reports desktop application, but the application is not able to find my log4net assembly, even though I have verified that my installer is registering the log4net DLL in the GAC. Below is the exception and stack trace.

Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral,
   PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system 
   cannot find the file specified.
at CrystalDecisions.Shared.SharedUtils..cctor()

I am honestly completely lost as to why this isn't working... The versions are the same and everything. Do I need to configure log4net before this will work?

Editing: I am using InstallShield 2012 to install my application assembly to the GAC. The only other things I am installing are a very small exe that references my dll, and a few files in Program Files folder to handle configuration.


Solution

  • Turns out I was using the same version of the dll, but the one I was using had a different PublicKeyToken. After I fixed that, it worked.