TraceEvent ETW Library published as a NuGet Package
I am happy to report that the TraceEvent Library Nuget Package and the TraceEvent Library Samples Nuget Package have been published at www.nuget.org. If you look for them be sure to set the filtering to include ‘prerelease’ or you will not see them. You can see this blog entry for the formal announcement of the library. If you have feedback on the library, you can either contact me through nuget or leave a comment on that blog (or this one).
The library has the TraceEvent programmers guide that comes with it that tells you about the architecture of the overall package and other useful background information. (note that the previous link is a copy of this guide, the most up to date version is the one that comes with the Nuget package).
The TraceEvent library for thosewho do not know is the library that makes PerfView possible. The TraceEvent library makes controlling and parsing Event Tracing for Windows (ETW) logging easy to do from managed code. For a while now we had the TraceEvent bcl.codeplex.com site, which also has a version of the code, but NuGet is significantly easier to use and we are transitioning the library there. The code in the NuGet package is significantly newer then the codeplex site (that site is currently 9 months old), so it recommend that you go there. The NuGet package has some breaking changes, however in the release notes you will find porting instructions. To give you a feel, it took about 2 hours to port PerfView over, and it is probably the heaviest user of the library.
The TraceEvent Samples are also a nice addition. It makes it very easy to see some examples usage that you can cut and paste to get started. The easiest way to use this samples is to create a new Console application and then install the Samples NuGet package into that project.
As previously discussed on this blog, there is a companion library EventSource Library Nuget Package and the EventSource Library Samples Nuget Package. EventSource as you now is the class that allows your .NET code to easily EMIT logging messages to ETW (or other places). EventSource is part of the .NET V4.5 and you should use the framework version if you can. However we have added features to the NuGet package that are not available (yet) in the .NET Framework Version. Another valuable aspect of the EventSource Nuget package is that it gives you COMPILE TIME feedback if you make errors creating your EventSource. This can avoid some frustration. The samples package is great for learning about the API, whether you use the Framework or Nuget version. See this blog entry for more.
P.S: Finally I should note that while you are more than welcome to build stuff with TraceEvent, if the functionality you want is closer to what PerfView already gives, you should consider simply writing a PerfView extension/ user command. For more on this simply see the docs under help -> Extending PerfView.