I was able to use Logging Appication block within an NUnit test and it works fine. However, when I start using the Logging Application block from within a dll, I get the following error with Enterprise library 4.1
System.Configuration.ConfigurationErrorsException : The configuration section for Logging cannot be found in the configuration source.
and the following error from within Enterprise library 5.0
Microsoft.Practices.ServiceLocation.ActivationException : Activation error occured while trying to get instance of type LogWriter, key ""
----> Microsoft.Practices.Unity.ResolutionFailedException : Resolution of the dependency failed, type = "Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The type LogWriter cannot be constructed. You must configure the container to supply this value.
At the time of the exception, the container was:
----> System.InvalidOperationException : The type LogWriter cannot be constructed. You must configure the container to supply this value
Basically, since App.config file cannot be included in dlls, I was wondering on how to specify the configuration in the dll.
I would like the applications to use this dll directly to log using the Library application block.
Thanks in advance.