Log4Net and GAC - How to reference Configuraition Files?

Posted by Adam on Stack Overflow See other posts from Stack Overflow or by Adam
Published on 2010-04-22T02:01:26Z Indexed on 2010/04/22 2:03 UTC
Read the original article Hit count: 323

Filed under:
|

Hello all

I am using log4net during my development, as as part of a project constraint, I now need to add it to the Global Assembly Cache.

The logging definitions are in a file Log4Net.xml. That file is referenced in my assemblyinfo as: [assembly: log4net.Config.XmlConfigurator(ConfigFile = "Log4Net.xml", Watch = true)]. So long as the xml file was in the same directory as the log4net.dll, everything has been working fine.

However now that I've added log4net to the GAC, it is no longer picking up the xml file.

Does anyone know what I need to change in order to have it pick up the XML file again? Is hardcoding the patch in the assembly reference the only way?

Many thanks

© Stack Overflow or respective owner

Related posts about log4net

Related posts about gac