From: mikelle-rogers <45022607+mikelle-rogers@users.noreply.github.com> Date: Mon, 4 Apr 2022 02:20:48 +0000 (-0600) Subject: dotnet-counters: Disable ANSI support on Windows as VTerm doesn't always respect... X-Git-Tag: accepted/tizen/unified/20221103.165810~28^2^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0c184f61ea0be0347845dbb4d6992aeafef389b;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git dotnet-counters: Disable ANSI support on Windows as VTerm doesn't always respect it and it breaks rendering (#2971) --- diff --git a/src/Tools/dotnet-counters/CounterMonitor.cs b/src/Tools/dotnet-counters/CounterMonitor.cs index 5e5d79431..b1790fda6 100644 --- a/src/Tools/dotnet-counters/CounterMonitor.cs +++ b/src/Tools/dotnet-counters/CounterMonitor.cs @@ -20,6 +20,7 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; +using System.Runtime.InteropServices; namespace Microsoft.Diagnostics.Tools.Counters { @@ -475,7 +476,7 @@ namespace Microsoft.Diagnostics.Tools.Counters using (DiagnosticsClientHolder holder = await builder.Build(ct, _processId, diagnosticPort, showChildIO: false, printLaunchCommand: false)) using (VirtualTerminalMode vTerm = VirtualTerminalMode.TryEnable()) { - bool useAnsi = vTerm.IsEnabled; + bool useAnsi = vTerm.IsEnabled && !RuntimeInformation.IsOSPlatform(OSPlatform.Windows); if (holder == null) { return ReturnCode.Ok;