M
Mark W.B.
Hi all,
I have made a custom tracelistener that writes Debug trace messages to
an xml file.
I have added this new tracelistener with the following lines of code:
xmlListener = new XmlTraceListener("\\TestRunnerTrace.xml");
Debug.Listeners.Add(xmlListener);
The new TraceListener works fine, but I want to use this TraceListener
to test assertions and therefore need to suppress the Assert messagebox
for the DefaultTraceListener. According to the MSDN [1], this is done
by clearing the Debug.Listeners collection before adding the custom
TraceListener:
xmlListener = new XmlTraceListener("\\OMCETestRunnerTrace.xml");
Debug.Listeners.Clear();
Debug.Listeners.Add(xmlListener);
Unfortunately I cannot get this working as expected. The Assert
messagebox still pops up at my smartphone so I must be missing
something. Any ideas to what that might be?
I'm running .NET Compact Framework 2.0.
Thanks
Mark
[1] http://msdn2.microsoft.com/en-us/library/6z60kt1f.aspx (See Note)
I have made a custom tracelistener that writes Debug trace messages to
an xml file.
I have added this new tracelistener with the following lines of code:
xmlListener = new XmlTraceListener("\\TestRunnerTrace.xml");
Debug.Listeners.Add(xmlListener);
The new TraceListener works fine, but I want to use this TraceListener
to test assertions and therefore need to suppress the Assert messagebox
for the DefaultTraceListener. According to the MSDN [1], this is done
by clearing the Debug.Listeners collection before adding the custom
TraceListener:
xmlListener = new XmlTraceListener("\\OMCETestRunnerTrace.xml");
Debug.Listeners.Clear();
Debug.Listeners.Add(xmlListener);
Unfortunately I cannot get this working as expected. The Assert
messagebox still pops up at my smartphone so I must be missing
something. Any ideas to what that might be?
I'm running .NET Compact Framework 2.0.
Thanks
Mark
[1] http://msdn2.microsoft.com/en-us/library/6z60kt1f.aspx (See Note)