-
-
Notifications
You must be signed in to change notification settings - Fork 226
0 ms is displayed for all analyzers under Analyzer Summary when using incompatible culture #687
Description
Found in version: 2.1.820
Steps to reproduce:
Use the 'en-US' culture:
Set-Culture 'en-US'
Create a new example project:
dotnet new consoleEnable code analysis, build the example project and generate a msbuild.binlog file:
dotnet build -bl -p:ReportAnalyzer=true -p:AnalysisLevel=latest-allOpen the msbuild.binlog file in MSBuild Structured Log Viewer using the 'de-AT' culture:
Set-Culture 'de-AT'
./msbuild.binlogExpected
Correct execution time is displayed for all analyzers under Analyzer Summary.
Actual
0 ms is displayed for all analyzers under Analyzer Summary.
Cause
No NumberFormat/CultureInfo is specified in Microsoft.Build.Logging.StructuredLogger.CscTaskAnalyzer.AnalyzerAssemblyData.FromFolder > ParseLine when parsing the execution time.
Workaround
Use Set-Culture 'en-US' or something similar before starting MSBuild Structured Log Viewer.
Suggested Fix
Use the culture (CurrentUICulture?) value from the log file to parse the execution time.