Trace.AutoFlush = true;
Trace.TraceInformation(string.Format("Try starting: {0}", System.Reflection.Assembly.GetExecutingAssembly().GetName()));
Trace.Flush();
I have read: How to Check the Application Event Log for Errors
But I can not find any traces! What am I doing wrong?
The Trace can output to multiple listeners.
These can include debug (visual studio), file and even database listeners.
By default the Trace outputs to the Visual Studio output window.
This article describes how to configure a file trace listener: How to: Create and Initialize Trace Listeners
Via the app.config:
Or via code:
If you want to log to the Event Log then you can use the Event Log Trace Listener.