Improved Tracing and ETW Support in .NET 4.5

.NET 4.5 added the System.Diagnostic.Tracing namespace.  Classes derived from its EventSource and EventListener classes are now preferred for tracing.  Vance Morrison’s blog has excellent articles about developing with these new classes.  EventSource is now the gateway from .NET to ETW so use EventSource instead of TraceSource or EventProvider.

For codebases prior to .NET 4.5, one of Vance Morrison’s blog posts contains EventSource.dll which provides a ‘stand-alone’ implementation of the EventSource class.  He says the dll provides an easy way to use the new approach with older code then simply unreferenced the dll when you upgrade to .NET 4.5.

Vance’s Channel 9 video is a great starting place.