I’m developping a log4net wrapper and I must inherit a custom class from log4net.Core.LogImpl to provide a TRACE level.
With a reference to log4net, I would have :
using log4net.Core;
public class TraceLogImpl : LogImpl, ITraceLog
{
...
}
The problem is that I must have no direct reference to log4net.dll in my projet : the library is in the bin directory (that way, I do not depend on a specific version of log4net) and it is loaded at runtime.
-> I can’t use “using log4net.Core”.
My question is : how can I inherit from this type by using reflection?
Thank you for your help!
You can’t, basically.
It sounds like you should possibly extract this into a separate project which does depend on log4net, and effectively treat it as an extra part of log4net itself (versioned alongside it etc).