Question

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.

Was it helpful?

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.

OTHER TIPS

Setting platform to x86 worked for me. Previous was AnyCPU

Assuming that the dll is already in the application folder, go to the properties of the project, click on Application Files and change the dll from "prerequisite" to "include", and save it. It would then be in GAC.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top