diff --git a/src/EditorFeatures/Core/Copilot/RoslynProposalAdjusterProvider.cs b/src/EditorFeatures/Core/Copilot/RoslynProposalAdjusterProvider.cs index f45fcc2ae5f46..f82a7549749cd 100644 --- a/src/EditorFeatures/Core/Copilot/RoslynProposalAdjusterProvider.cs +++ b/src/EditorFeatures/Core/Copilot/RoslynProposalAdjusterProvider.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.Composition; +using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -41,7 +42,7 @@ private static void SetDefaultTelemetryProperties(Dictionary ma // Common properties that all adjustments will log. map["ProviderName"] = providerName; map["AdjustProposalBeforeDisplay"] = before; - map["ComputationTime"] = elapsedTime.TotalMilliseconds.ToString("G17"); + map["ComputationTime"] = elapsedTime.TotalMilliseconds.ToString("G17", CultureInfo.InvariantCulture); } private async Task AdjustProposalAsync( diff --git a/src/Features/Core/Portable/Copilot/CopilotChangeAnalysisUtilities.cs b/src/Features/Core/Portable/Copilot/CopilotChangeAnalysisUtilities.cs index e93fa3ccdd212..fe4b2e5631080 100644 --- a/src/Features/Core/Portable/Copilot/CopilotChangeAnalysisUtilities.cs +++ b/src/Features/Core/Portable/Copilot/CopilotChangeAnalysisUtilities.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; +using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -116,7 +117,7 @@ private static string Stringify(TValue value) where TValue : notnull return string.Join(":", strings.OrderBy(v => v)); if (value is TimeSpan timeSpan) - return timeSpan.TotalMilliseconds.ToString("G17"); + return timeSpan.TotalMilliseconds.ToString("G17", CultureInfo.InvariantCulture); return value.ToString() ?? ""; }