EventSource .net 4.0 GenerateManifest

前端 未结 3 787
死守一世寂寞
死守一世寂寞 2021-01-21 00:14

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

3条回答
  •  一整个雨季
    2021-01-21 00:19

    You don't need to get the Manifest any longer. You can now directly register the EventSource:

    Registering your EventSource

    When you install the EventSource NuGet package, the build step previously mentioned generates the following files for each EventSource in your application:

    AssemblyName.EventSourceTypeName.etwManifest.man

    AssemblyName.EventSourceTypeName.etwManifest.dll.

    These files need to be registered with the operating system to enable channel support. To do this you run the following command after the files are in their final deployed location:

    wevtutil.exe im EtwManifestManFile /rf:"EtwManifestDllFile"c /mf:"EtwManifestDllFile"

    Microsoft explained this in this Blog:

    Announcing the EventSource NuGet Package – Write to the Windows Event Log

提交回复
热议问题