Logging Application Block - Custom Trace Listener

Topics: General discussion, Logging Application Block
Apr 16, 2007 at 4:09 PM
Edited Apr 16, 2007 at 4:09 PM
Hi Everyone,
Basing on Custom Trace Listener(DebugTraceListener)example in Logging Quick Start, I developed a TraceListener. But, when I try to use that I am getting this error
"The type 'DebugTraceListener' cannot be resolved. Please verify the spelling is correct or that the full type name is provided".

Is this anything to do with references?

I included all these references

using Microsoft.Practices.EnterpriseLibrary.Logging;
using Microsoft.Practices.EnterpriseLibrary.Logging.Formatters;
using Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners;
using Microsoft.Practices.EnterpriseLibrary.Common;
using Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder;
using Microsoft.Practices.EnterpriseLibrary.Configuration;
using Microsoft.Practices.ObjectBuilder;

If I use any default TraceListener, they are working perfectly. I am not sure what is going wrong.
Apr 16, 2007 at 5:20 PM
I'm guessing the problem is probably that your host application isn't referencing the assembly that contains the custom trace listener. You won't need any using statements since you don't need to call the TraceListener programmatically; however the application will need to find the custom class from the assembly specified in the configutation file.

Apr 16, 2007 at 5:40 PM
Edited Apr 16, 2007 at 5:51 PM
Thank you very much for the fast reply.
How shall I modify my host application so that it reads the custom class?