Requires log4net version 1.2.10 be installed in GAC

Al Lelopath picture Al Lelopath · Mar 4, 2014 · Viewed 22.2k times · Source

With a windows smart client application, it runs fine on my (development) machine, but when I installed it on a user's machine, I get this error:
Requires log4net version 1.2.10 be installed in GAC

On my development machine, I have 2 log4net files that are GACed: one x86, one 64 bit. The user machine has only the x86 version. So I guess the user needs the 64 bit, yes? If so, how do I install a 64 bit version of log4net?

Note that this is a different error than this: Error: Could not load log4net assembly

I've discovered another difference. If I publish in Development/Debug configuration, it works. If I publish in Release config, I get the error.

There seems to be no direct log4net references. It is use in either CrystalReports or NHibernate or both.

In Debug Configuration, the application is running as 32bit, in Release Configuration, the application is running as 64bit. If I could get the Release Configuration to run as 32bit, I think that would solve the problem. Can anyone say how that is done?

Answer

Cerveser picture Cerveser · Mar 5, 2014

You can change the Release configuration to x86 in Visual Studio => Project properties => Compile => Advanced Compile options