1 create and write the manifest.xml
<instrumentationManifest xmlns="http://schemas.microsoft.com/win/2004/08/events">
<instrumentation xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events">
<events xmlns="http://schemas.microsoft.com/win/2004/08/events">
<!--Publisher Info -->
<provider name="DotNetPerformance-TechalWriting-EventLogSample"
guid="{9CDE86C9-DFB9-463f-B2C5-71EEC232A69C}"
symbol="DOTNETPERFORMANCE_TECHNICALWRITING_PUBLISHER"
resourceFileName="C:\adams\etw\Debug\EventLogging.exe"
messageFileName="C:\adams\etw\Debug\EventLogging.exe">
<!--Channel to which this Publisher can publish -->
<channels>
<channel chid="MyOpChannel"
name="DotNetPerformance-TechalWriting-EventLogSample/Operational"
type="Operational"
symbol="DOTNETPERFORMANCEOP"
isolation="Application" enabled="true"/>
<channel chid="MyDebugChannel"
name="DotNetPerformance-TechalWriting-EventLogSample/Debug"
type="Debug"
symbol="DOTNETPERFORMANCEDEBUG"
isolation="Application" enabled="true"/>
</channels>
<!--Event Templates -->
<templates>
<template tid="SimpleEvent" message="$(string.SimpleMessage)">>
<data name="Message" inType="win:UnicodeString"/>
<UserData>
<SimpleEvent xmlns="http://manifests.microsoft.com/win/2004/08/windows/simpleevent">
<ExceptionMessage>%1</ExceptionMessage>
</SimpleEvent>
</UserData>
</template>
</templates>
<events>
<event value="1"
level="win:Informational"
template="SimpleEvent"
opcode="win:Info"
channel="MyOpChannel"
symbol="DNP_OP_EVENT"
message="$(string.SimpleMessage)"/>
<event value="2"
level="win:Informational"
template="SimpleEvent"
opcode="win:Info"
channel="MyDebugChannel"
symbol="DNP_DEBUG_EVENT"
message="$(string.SimpleMessage)"/>
</events>
</provider>
</events>
</instrumentation>
<localization>
<resources culture="en-US">
<stringTable>
<string id="SimpleMessage" value="%1" stringType="string"/>
</stringTable>
</resources>
</localization>
</instrumentationManifest>
<instrumentation xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events">
<events xmlns="http://schemas.microsoft.com/win/2004/08/events">
<!--Publisher Info -->
<provider name="DotNetPerformance-TechalWriting-EventLogSample"
guid="{9CDE86C9-DFB9-463f-B2C5-71EEC232A69C}"
symbol="DOTNETPERFORMANCE_TECHNICALWRITING_PUBLISHER"
resourceFileName="C:\adams\etw\Debug\EventLogging.exe"
messageFileName="C:\adams\etw\Debug\EventLogging.exe">
<!--Channel to which this Publisher can publish -->
<channels>
<channel chid="MyOpChannel"
name="DotNetPerformance-TechalWriting-EventLogSample/Operational"
type="Operational"
symbol="DOTNETPERFORMANCEOP"
isolation="Application" enabled="true"/>
<channel chid="MyDebugChannel"
name="DotNetPerformance-TechalWriting-EventLogSample/Debug"
type="Debug"
symbol="DOTNETPERFORMANCEDEBUG"
isolation="Application" enabled="true"/>
</channels>
<!--Event Templates -->
<templates>
<template tid="SimpleEvent" message="$(string.SimpleMessage)">>
<data name="Message" inType="win:UnicodeString"/>
<UserData>
<SimpleEvent xmlns="http://manifests.microsoft.com/win/2004/08/windows/simpleevent">
<ExceptionMessage>%1</ExceptionMessage>
</SimpleEvent>
</UserData>
</template>
</templates>
<events>
<event value="1"
level="win:Informational"
template="SimpleEvent"
opcode="win:Info"
channel="MyOpChannel"
symbol="DNP_OP_EVENT"
message="$(string.SimpleMessage)"/>
<event value="2"
level="win:Informational"
template="SimpleEvent"
opcode="win:Info"
channel="MyDebugChannel"
symbol="DNP_DEBUG_EVENT"
message="$(string.SimpleMessage)"/>
</events>
</provider>
</events>
</instrumentation>
<localization>
<resources culture="en-US">
<stringTable>
<string id="SimpleMessage" value="%1" stringType="string"/>
</stringTable>
</resources>
</localization>
</instrumentationManifest>