When you try to navigate to the page for Debug.Listeners Property for .NET Standard 2 the page clearly states:
The requested page is not available for .NET Standard 2.0. You have been redirected to the newest product version this page is available for.
Diving in a bit deeper, you can find all APIs implemented in .NET standard 2 on their github. Here you can see that the public static class Debug
doesn't have a Listeners
property.
However, the article on the Debug.Listeners Property I referred to above also states
The Listeners collection is shared by both the Debug and the Trace classes; adding a trace listener to either class adds the listener to both.
The .NET standard API's also learns us that the public sealed class Trace
does implement public static TraceListenerCollection Listeners { get; }
. This would lead me to believe you can access the Listeners through the Trace class
.