ETW Error RRS feed

  • Question

  • Hi everyone,

    I've developed application in C# that uses ETW.
    i have uses Nuget package:

    Microsoft.Diagnostics.Tracing.TraceEvent 1.0.41, 
    and Costura Fody 1.6.2 to merge DLLs into one exe. 

    And it successed build and runs for both .net 4.5 and .net 3.5 on my locol machine, windows 10.
    But when I test the 3.5 on windows server 2008, it give me this error.  

    System.ArgumentException: Illegal characters in path.

       at System.IO.Path.CheckInvalidPathChars(String path)

       at System.IO.Path.GetDirectoryName(String path)

       at NativeDlls.LoadNative(String simpleName)

       at Microsoft.Diagnostics.Tracing.Session.TraceEventSession.StartKernelTrace(UInt64& TraceHandle, EVENT_TRACE_PROPERTI

    ES* properties, STACK_TRACING_EVENT_ID* stackTracingEventIds, Int32 cStackTracingEventIds)

       at Microsoft.Diagnostics.Tracing.Session.TraceEventSession.EnableKernelProvider(Keywords flags, Keywords stackCapture


       at Microsoft.Diagnostics.Tracing.Session.TraceEventSession.EnableKernelProvider(Keywords flags, Keywords stackCapture


    I tired to print out 

    they do not show any Illegal characters.

    It works fine if I don't use Costura Fody to merge the exe. 
    And i dont want to use Ilmerge because I want to change the code in the future to make it unmanaged so i can call it other language. 

    Friday, April 27, 2018 6:48 PM

All replies

  • Hi Wenchung Shang,

    Have you try the .net framework 4.5 on the Windows Server 2008 R2? Do you get the same error?

    If yes, there is something wrong in your code when you run this on Windows Server 2008 R2.

    According to the error message below, please check the path on the Windows Server 2008 R2. I am not sure the path works in your win10 and also works well in your Windows Server 2008 R2.

    System.ArgumentException: Illegal characters in path.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, April 30, 2018 6:51 AM
  • Hi Wendy,

    Yes I tried ..net framework 4.5 on the Windows Server 2008 R2. I'm getting the same error. Even i checked the path it's correct. So in this case what I should do ?

    Can you help me out?


    Monday, April 30, 2018 1:02 PM