Microsoft Releases New Event Tracing Packages

The update, available through NuGet, supports older versions of the .NET Framework.

Microsoft announced today the release to manufacturing (RTM) of the EventSource NuGet package, which includes support for the older .NET Framework 3.5.

Cosmin Radu, a software developer on the .NET Runtime team, blogged about the RTM, calling it a response to user feedback. In addition, Radu said that the EventSource and EventRegister packages are now stable.

The EventSource release had to major upgrades, according to the blog. They involve better code sharing across multiple event source types, including:

  • EventSource types may now implement interfaces to enable the use of event source types in advanced logging systems that use interfaces to define a common logging target.
  • The concept of a utility event source type (defined as an abstract class deriving from EventSource) is introduced to support sharing code across multiple event source types in a project (e.g. for optimized WriteEvent() overloads).

EventSource is available as either a NuGet package or a class within the current .NET Framework. Microsoft recommends that if you're on the latest version of .NET -- 4.5, it's better to use the class. For those on .NET 3.5 or 4.0, or needing channel support, Redmond says the NuGet package is the way to go. The package name is Microsoft.Diagnostics.Tracing.EventSource.

The NuGet package enables a new feature: event log support. It allows a developer to define an additional destination for EventSource events, so they can be application-specific. The package supports the four predefined Event Event Tracing for Windows (ETW) channels that the Windows Event Log Defines: Admin, Operational, Analytics and Debug.

Radu explained the feedback that prompted the updates:

"We've received feedback that the build-time validation included in the beta release of EventSource was providing a significant benefit to anybody that was defining their own event source... As a result, we have released this functionality in the EventRegister NuGet package, which can be referenced from any project that uses some variation of EventSource."

The EventRegister Tool was first available as a Release Candidate (RC) last November, and went through two more RCs before today's stable release. EventSource was available in beta form last August, and has gone through three beta stages and three RC stages before the stable release of today.

NuGet is Microsoft's package manager for the .NET Framework. It's currently at version 2.8.

About the Author

Keith Ward is the editor in chief of Virtualization & Cloud Review. Follow him on Twitter @VirtReviewKeith.

comments powered by Disqus


Subscribe on YouTube