Microsoft EventSource Library 1.0.4-beta - WriteEvent without any param doesn't log - by Muhammad Siddiqi

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 800720 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 9/14/2013 6:39:59 AM
Access Restriction Public


Add the following to your EventSource class after adding the nuget package [].

[Event(2, Keywords = Keywords.Database, Message = "Start processing request Database",
   Channel = EventChannel.Admin, Task = Tasks.PasswordHashing, Opcode = EventOpcode.Start)]
public void RequestPasswordHashingWithoutParams()

It doesn't register any event data to the EventLog. As soon as you add a parameter to it, it starts working. Further details can be found here: []
Sign in to post a comment.
Posted by Cosmin [MSFT] on 11/6/2013 at 11:18 AM
Hi Muhammad, thanks for your report. It appears the issue you've found is a corner case that the OS is (arguably) handling incorrectly: when an ETW manifest is registered, and does not have any templates defined, ETW events fired by the provider will not get directed to the destination channel. This is probably an extremely unlikely occurence (the vast majority of ETW providers will have at least one event that contains arguments). Nonetheless the next NuGet release of EventSource will contain a workaround to ensure things work as expected even in this case.

Thanks for your interest in EventSource and for your report.
Cosmin Radu
Posted by Cosmin [MSFT] on 10/15/2013 at 12:17 PM
Please ignore my previous request for a repro. I was actually able to reproduce the issue by making sure there is only one ETW event method defined in the custom event source class, and that this one method does not have any arguments. As soon as I added another method (with arguments) to the event source, even if that other method is never called, the ETW event is correctly logged to the event log. I'll be investigating further and post my findings to this thread.
Posted by Cosmin [MSFT] on 10/15/2013 at 11:24 AM
Hi Muhammad, and thank you for your report. I've tried your scenario and had no issue getting the new event to show up in the EventLog, as expected. I have some questions:
1. What OS are you running this on?
2. Can you send me your project and exact steps for the repro?

-Cosmin Radu
Posted by Macy [MSFT] on 9/16/2013 at 3:46 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Macy [MSFT] on 9/14/2013 at 6:51 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(