提交 cfb05bda 编写于 作者: M Manish Vasani

Ensure that syntax tree actions are also re-executed by the solution crawler...

Ensure that syntax tree actions are also re-executed by the solution crawler when compilation options (or analyzer rule severities) are changed.

Fixes #3796
上级 53ed0035
......@@ -205,7 +205,7 @@ public void Project_AssemblyName_Change()
var project = workspace.CurrentSolution.Projects.First(p => p.Name == "P1").WithAssemblyName("newName");
var worker = ExecuteOperation(workspace, w => w.ChangeProject(project.Id, project.Solution));
Assert.Equal(0, worker.SyntaxDocumentIds.Count);
Assert.Equal(5, worker.SyntaxDocumentIds.Count);
Assert.Equal(5, worker.DocumentIds.Count);
}
}
......@@ -222,7 +222,7 @@ public void Project_AnalyzerOptions_Change()
var project = workspace.CurrentSolution.Projects.First(p => p.Name == "P1").AddAdditionalDocument("a1", SourceText.From("")).Project;
var worker = ExecuteOperation(workspace, w => w.ChangeProject(project.Id, project.Solution));
Assert.Equal(0, worker.SyntaxDocumentIds.Count);
Assert.Equal(5, worker.SyntaxDocumentIds.Count);
Assert.Equal(5, worker.DocumentIds.Count);
}
}
......
......@@ -29,6 +29,7 @@ internal partial struct InvocationReasons
public static readonly InvocationReasons ProjectConfigurationChanged =
new InvocationReasons(
ImmutableHashSet.Create<string>(
PredefinedInvocationReasons.SyntaxChanged,
PredefinedInvocationReasons.SemanticChanged));
public static readonly InvocationReasons SolutionRemoved =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册