未验证 提交 d4dc2b72 编写于 作者: S Sam Harwell 提交者: GitHub

Merge pull request #40887 from sharwell/workspace-failures

Show workspace failures in AnalyzerRunner
......@@ -85,6 +85,14 @@ public static async Task Main(string[] args)
Solution solution = await workspace.OpenSolutionAsync(options.SolutionPath, cancellationToken: cancellationToken).ConfigureAwait(false);
var projectIds = solution.ProjectIds;
foreach (var workspaceDiagnostic in workspace.Diagnostics)
{
if (workspaceDiagnostic.Kind == WorkspaceDiagnosticKind.Failure)
{
Console.WriteLine(workspaceDiagnostic.Message);
}
}
foreach (var projectId in projectIds)
{
solution = solution.WithProjectAnalyzerReferences(projectId, ImmutableArray<AnalyzerReference>.Empty);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册