Skip to content

Commit

Permalink
#714 Improved AoT compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpalme committed Dec 21, 2024
1 parent e4757cc commit 00389e5
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/ReportGenerator.Core/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,18 @@ public bool GenerateReport(
return false;
}

Logger.Debug(Resources.Settings);
Logger.Debug(" " + System.Text.Json.JsonSerializer.Serialize(settings));
Logger.Debug(" " + System.Text.Json.JsonSerializer.Serialize(minimumCoverageThresholds));
Logger.Debug(" " + System.Text.Json.JsonSerializer.Serialize(riskHotspotsAnalysisThresholds));
try
{
string settingsAsJson = System.Text.Json.JsonSerializer.Serialize(settings);
Logger.Debug(Resources.Settings);
Logger.Debug(" " + settingsAsJson);
Logger.Debug(" " + System.Text.Json.JsonSerializer.Serialize(minimumCoverageThresholds));
Logger.Debug(" " + System.Text.Json.JsonSerializer.Serialize(riskHotspotsAnalysisThresholds));
}
catch (InvalidOperationException)
{
// Json serialization may fail in AOT scenarios
}

var stopWatch = Stopwatch.StartNew();

Expand Down

0 comments on commit 00389e5

Please sign in to comment.