I have implemented a custom trace listener (derived from TextWriteTraceListener) and now I would like to set my application to use it instead of standard
TextWriteTraceListener
I've been struggling with this recently and just in case it helps anyone...
I knew my type existed so I wrote the following:
Assembly assembly = System.Reflection.Assembly.GetAssembly(typeof("yourclassname")); Type myClassType = assembly.GetType("yournamespace.yourclassname");
In my case, myClassType.AssemblyQualifiedName contained the string I needed in my app.config file in the type attribute.
For example: