From 7e85376079d2cfab05b4c0d7d6733eaa3025237e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 03:46:18 +0000 Subject: [PATCH 1/2] Initial plan From c37eaf20c0eeffa9b487c60efddd605e0bf1fa19 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 03:50:03 +0000 Subject: [PATCH 2/2] Fix EtwListener to use GUID overload of EnableProvider to avoid TdhEnumerateProviders NRE Co-authored-by: danmoseley <6385855+danmoseley@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/e4ac4ef8-4b48-4100-ba69-c2e8228b9107 --- .../tests/BasicEventSourceTest/Harness/EtwListener.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs index 179be31081f980..88c1837906dfd3 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs @@ -94,7 +94,8 @@ private void ApplyEventSourceCommand(string eventSourceName, EventCommand comman if (options == null) options = new FilteringOptions(); - _session.EnableProvider(eventSourceName, (TraceEventLevel)options.Level, (ulong)options.Keywords, + var providerGuid = TraceEventProviders.GetEventSourceGuidFromName(eventSourceName); + _session.EnableProvider(providerGuid, (TraceEventLevel)options.Level, (ulong)options.Keywords, new TraceEventProviderOptions() { Arguments = options.Args }); } else if (command == EventCommand.Disable)