提交 7416eb7b 编写于 作者: C Cyrus Najmabadi

Only check the actual declared 'External' references of a compilation in the compilation tracker.

Otherwise, if we use 'Compilation.References' instead, then the compiler will spend a ton
of time scanning through those references looking for #r directives.  The compilation tracker
does not care about these, and is only checking actual declared project references.
上级 a7d664c0
......@@ -261,7 +261,7 @@ public CompilationTracker FreezePartialStateWithTree(Solution solution, Document
if (metadata == null)
{
// if we failed to get the metadata, check to see if we previously had existing metadata and reuse it instead.
metadata = inProgressCompilation.References.FirstOrDefault(r => solution.GetProjectId(r) == projectReference.ProjectId);
metadata = inProgressCompilation.ExternalReferences.FirstOrDefault(r => solution.GetProjectId(r) == projectReference.ProjectId);
}
if (metadata != null)
......@@ -274,7 +274,7 @@ public CompilationTracker FreezePartialStateWithTree(Solution solution, Document
}
inProgressProject = inProgressProject.AddProjectReferences(newProjectReferences);
if (!Enumerable.SequenceEqual(inProgressCompilation.References, metadataReferences))
if (!Enumerable.SequenceEqual(inProgressCompilation.ExternalReferences, metadataReferences))
{
inProgressCompilation = inProgressCompilation.WithReferences(metadataReferences);
}
......@@ -645,7 +645,7 @@ public CompilationInfo(Compilation compilation, bool hasCompleteReferences)
}
}
if (!Enumerable.SequenceEqual(compilation.References, newReferences))
if (!Enumerable.SequenceEqual(compilation.ExternalReferences, newReferences))
{
compilation = compilation.WithReferences(newReferences);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册