Skip to content

Commit

Permalink
fix(initialisation): Make sure to select valid IAnalyzerResult from B…
Browse files Browse the repository at this point in the history
…uildalyzer (#1900)

Fixes #1899

Co-authored-by: Rouke Broersma <mobrockers@gmail.com>
  • Loading branch information
0xced and rouke-broersma authored Feb 11, 2022
1 parent 525a3cd commit da2cd52
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private IAnalyzerResult SelectAnalyzerResult(IAnalyzerResults analyzerResults, s
{
if (targetFramework == null)
{
return analyzerResults.First();
return analyzerResults.First(e => e.TargetFramework != null);
}

var analyzerResultForFramework = analyzerResults.SingleOrDefault(result => result.TargetFramework == targetFramework);
Expand Down

0 comments on commit da2cd52

Please sign in to comment.