I\'ve been trying to work with ETW in .net 4.0.
I have started using Microsoft EventSource Library 1.0.4-beta (https://www.nuget.org/packages/Microsoft.Diagnostics.Trac
The answer by @magicandre1981 is correct in the sense that it's not necessary to generate manifests with newer versions of .NET
and EventSource
. (In fact, it's still taking place, but it's just been hidden behind a build event that gets put into your project file when you're installing the EventSource package.)
However, depending on what you're doing, you might still need to generate the manifest manually. Here's one way to do it:
Install-Package Microsoft.Diagnostics.Tracing.EventSource
) into your project or download and unpack it where you need iteventRegister.exe
. (It will most likely be somewhere under folder similar to packages\Microsoft.Diagnostics.Tracing.EventRegister.1.1.26\build
relative to the package installation folder)eventRegister.exe {path-to-dll-with-your-eventsource-class} {manifest-output-file-prefix}
After that you'll see two files per each EventSource class that you have in the dll:
And those are the ones you can then feed to wevtutil:
wevtutil.exe
im {EtwManifestManFile}
/rf:"{EtwManifestDllFile}"
/mf:"{EtwManifestDllFile}"