Fix DHT when referencing projects
This commit is contained in:
parent
b00a75e3ea
commit
fa55e6fa2b
1 changed files with 9 additions and 4 deletions
|
@ -47,18 +47,23 @@ namespace Microsoft.DotNet.ProjectModel.Server
|
||||||
foreach (var export in allExports.Values)
|
foreach (var export in allExports.Values)
|
||||||
{
|
{
|
||||||
allSourceFiles.AddRange(export.SourceReferences.Select(f => f.ResolvedPath));
|
allSourceFiles.AddRange(export.SourceReferences.Select(f => f.ResolvedPath));
|
||||||
allFileReferences.AddRange(export.CompilationAssemblies.Select(asset => asset.ResolvedPath));
|
|
||||||
|
|
||||||
var diagnostics = diagnosticsLookup[export.Library].ToList();
|
var diagnostics = diagnosticsLookup[export.Library].ToList();
|
||||||
var description = DependencyDescription.Create(export.Library, diagnostics, allExports);
|
var description = DependencyDescription.Create(export.Library, diagnostics, allExports);
|
||||||
allDependencies[description.Name] = description;
|
allDependencies[description.Name] = description;
|
||||||
|
|
||||||
var projectDescription = export.Library as ProjectDescription;
|
var projectDescription = export.Library as ProjectDescription;
|
||||||
if (projectDescription != null && projectDescription.Identity.Name != context.ProjectFile.Name)
|
if (projectDescription != null)
|
||||||
|
{
|
||||||
|
if (projectDescription.Identity.Name != context.ProjectFile.Name)
|
||||||
{
|
{
|
||||||
allProjectReferences.Add(ProjectReferenceDescription.Create(projectDescription));
|
allProjectReferences.Add(ProjectReferenceDescription.Create(projectDescription));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
allFileReferences.AddRange(export.CompilationAssemblies.Select(asset => asset.ResolvedPath));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
snapshot.RootDependency = context.ProjectFile.Name;
|
snapshot.RootDependency = context.ProjectFile.Name;
|
||||||
snapshot.TargetFramework = context.TargetFramework;
|
snapshot.TargetFramework = context.TargetFramework;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue