|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Shared trace listener problemVisual Studio 2005. I have a custom trace listener defined as a shared listener and it is referenced from the trace section and from a trace source section in the config file. The problem is that the TraceListener is created twice when debugging causing file access problems, whereas it is only created once if I run without debugger. Can anyone explain this? Example config file below. <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.diagnostics> <sharedListeners> <add initializeData="output.xml" type="WINICS.Diagnostics.XmlWriterTraceListener,WINICS.Diagnostics" name ="WINICSTraceListener" /> </sharedListeners> <sources> <source name="TestHarness" switchValue="Verbose"> <listeners> <add name="WINICSTraceListener"/> </listeners> </source> </sources> <trace> <listeners> <add name="WINICSTraceListener" /> </listeners> </trace> </system.diagnostics> </configuration> |
|||||||||||||||||||||||