Skip to content

Commit

Permalink
Use absolute paths for analyzer references
Browse files Browse the repository at this point in the history
  • Loading branch information
tjchester authored and daveaglick committed Dec 18, 2023
1 parent 2f9437e commit 1b0c85b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Buildalyzer.Workspaces/AnalyzerResultExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,8 @@ private static IEnumerable<AnalyzerReference> GetAnalyzerReferences(IAnalyzerRes
{
IAnalyzerAssemblyLoader loader = workspace.Services.GetRequiredService<IAnalyzerService>().GetLoader();

return analyzerResult
.AnalyzerReferences?.Where(File.Exists)
.Select(x => new AnalyzerFileReference(x, loader))
return analyzerResult.AnalyzerReferences?.Where(x => File.Exists(Path.GetFullPath(x)))
.Select(x => new AnalyzerFileReference(Path.GetFullPath(x), loader))
?? (IEnumerable<AnalyzerReference>)Array.Empty<AnalyzerReference>();
}

Expand Down

0 comments on commit 1b0c85b

Please sign in to comment.