Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Docfx.Dotnet/DotnetApiCatalog.Compile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.Build.Framework;
using Microsoft.Build.Logging;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.MSBuild;

#nullable enable
Expand Down Expand Up @@ -132,6 +133,13 @@ await LoadCompilationFromProject(project.AbsolutePath) is { } compilation)
await Process.Start("dotnet", $"restore \"{path}\"").WaitForExitAsync();
}
project = await workspace.OpenProjectAsync(path, msbuildLogger);

foreach (var unresolvedAnalyzer in project.AnalyzerReferences.OfType<UnresolvedAnalyzerReference>())
{
Logger.LogWarning($"There is .NET Analyzer that can't be resolved. "
+ $"If this analyzer is .NET Source Generator project. "
+ $"Try build with `dotnet build -c Release` command before running docfx. Path: {unresolvedAnalyzer.FullPath}");
}
}

if (!project.SupportsCompilation)
Expand Down