diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs index 321d60de739b32..d6093b4fb66bb3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs @@ -495,6 +495,9 @@ public static void SendCommand(EventSource eventSource, EventCommand command, ID /// public override string ToString() { + if (!IsSupported) + return base.ToString()!; + return SR.Format(SR.EventSource_ToString, Name, Guid); }