114 references to ProjectReferences
Microsoft.Build (9)
BackEnd\BuildManager\BuildManager.cs (1)
2017
.Where(node => node.
ProjectReferences
.All(projectReference => finishedNodes.Contains(projectReference)))
Graph\GraphBuilder.cs (1)
468
foreach (var referenceNode in node.
ProjectReferences
)
Graph\ProjectGraph.cs (4)
528
foreach (var reference in node.
ProjectReferences
)
578
foreach (var reference in partialRoot.
ProjectReferences
)
717
if (node.
ProjectReferences
.Count == 0)
726
foreach (var referenceNode in node.
ProjectReferences
)
Graph\ProjectGraphNode.cs (1)
56
$"{truncatedProjectFile}, #GlobalProps={ProjectInstance.GlobalProperties.Count}, #Props={ProjectInstance.Properties.Count}, #Items={ProjectInstance.Items.Count}, #in={ReferencingProjects.Count}, #out={
ProjectReferences
.Count}";
Graph\ProjectInterpretation.cs (2)
254
foreach (ProjectGraphNode innerBuild in outerBuild.
ProjectReferences
)
264
if (outerBuildReferencingProject.
ProjectReferences
.Contains(innerBuild))
Microsoft.Build.Engine.UnitTests (105)
Graph\GraphLoadedFromSolution_tests.cs (7)
626
node1.
ProjectReferences
.Count.ShouldBe(3);
627
node1.
ProjectReferences
.Count(r => GetProjectNumber(r) == 2).ShouldBe(3);
631
outerBuild3.
ProjectReferences
.Count.ShouldBe(3);
632
outerBuild3.
ProjectReferences
.Count(r => GetProjectNumber(r) == 3).ShouldBe(2);
633
outerBuild3.
ProjectReferences
.Count(r => GetProjectNumber(r) == 4).ShouldBe(1);
635
GetInnerBuilds(graph, 3).SelectMany(n => n.
ProjectReferences
).Count(r => GetProjectNumber(r) == 4).ShouldBe(2);
696
if (projectConfigurations == null || graphFromSolution.ProjectNodes.All(n => n.
ProjectReferences
.Count == 0))
Graph\GraphTestingUtilities.cs (5)
50
outerBuild.
ProjectReferences
.Count.ShouldBe(expectedInnerBuildCount);
53
foreach (ProjectGraphNode innerBuild in outerBuild.
ProjectReferences
)
67
ProjectGraphNode[] innerBuilds = outerBuildReferencer.
ProjectReferences
220
foreach (var reference in projectGraphNode.
ProjectReferences
)
243
node.
ProjectReferences
.Select(GetProjectNumber).ShouldBeSameIgnoringOrder(expectedReferences);
Graph\ProjectGraph_Tests.cs (89)
147
node.
ProjectReferences
.ShouldBeSameIgnoringOrder(new[] { reference1, reference2 });
151
reference1.
ProjectReferences
.ShouldBeEmpty();
154
reference2.
ProjectReferences
.ShouldBeEmpty();
163
node.
ProjectReferences
.ShouldBeEmpty();
166
reference1.
ProjectReferences
.ShouldBeEmpty();
169
reference2.
ProjectReferences
.ShouldBeEmpty();
233
GetFirstNodeWithProjectNumber(graph, 1).
ProjectReferences
.Count.ShouldBe(2);
234
GetFirstNodeWithProjectNumber(graph, 2).
ProjectReferences
.Count.ShouldBe(0);
235
GetFirstNodeWithProjectNumber(graph, 3).
ProjectReferences
.Count.ShouldBe(0);
270
node1.
ProjectReferences
.Count.ShouldBe(2);
271
node2.
ProjectReferences
.Count.ShouldBe(3);
272
node3.
ProjectReferences
.Count.ShouldBe(0);
273
node4.
ProjectReferences
.Count.ShouldBe(0);
274
node5.
ProjectReferences
.Count.ShouldBe(1);
275
node6.
ProjectReferences
.Count.ShouldBe(1);
276
node7.
ProjectReferences
.Count.ShouldBe(0);
287
node2.
ProjectReferences
.ShouldContain(node6);
288
node6.
ProjectReferences
.ShouldContain(node1);
289
node1.
ProjectReferences
.ShouldContain(node5);
290
node5.
ProjectReferences
.ShouldContain(node7);
373
root1.
ProjectReferences
.First(r => GetProjectNumber(r) == 3).ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor1);
374
root1.
ProjectReferences
.First(r => GetProjectNumber(r) == 4).ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor1);
380
root2.
ProjectReferences
.First(r => GetProjectNumber(r) == 4).ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor2);
381
root2.
ProjectReferences
.First(r => GetProjectNumber(r) == 5).ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor2);
409
GetFirstNodeWithProjectNumber(graph, 2).
ProjectReferences
.First().ShouldNotBe(GetFirstNodeWithProjectNumber(graph, 3).
ProjectReferences
.First());
410
GetFirstNodeWithProjectNumber(graph, 2).
ProjectReferences
.First().ProjectInstance.FullPath.ShouldEndWith("4.proj");
411
GetFirstNodeWithProjectNumber(graph, 2).
ProjectReferences
.First().ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(EmptyGlobalProperties);
412
GetFirstNodeWithProjectNumber(graph, 3).
ProjectReferences
.First().ProjectInstance.FullPath.ShouldEndWith("4.proj");
413
GetFirstNodeWithProjectNumber(graph, 3).
ProjectReferences
.First().ProjectInstance.GlobalProperties.Count.ShouldBeGreaterThan(1);
466
var node4A = GetFirstNodeWithProjectNumber(graph, 2).
ProjectReferences
.First();
467
var node4B = GetFirstNodeWithProjectNumber(graph, 3).
ProjectReferences
.First();
470
node4A.
ProjectReferences
.Count.ShouldBe(1);
471
node4B.
ProjectReferences
.Count.ShouldBe(1);
472
node4A.
ProjectReferences
.First().ShouldBe(node4B.
ProjectReferences
.First());
503
GetFirstNodeWithProjectNumber(graph, 2).
ProjectReferences
.First().ShouldBe(GetFirstNodeWithProjectNumber(graph, 3).
ProjectReferences
.First());
538
GetFirstNodeWithProjectNumber(graph, 2).
ProjectReferences
.First().ShouldBe(GetFirstNodeWithProjectNumber(graph, 3).
ProjectReferences
.First());
539
GetFirstNodeWithProjectNumber(graph, 2).
ProjectReferences
.First().ProjectInstance.FullPath.ShouldEndWith("5.proj");
540
GetFirstNodeWithProjectNumber(graph, 2).
ProjectReferences
.First().ProjectInstance.GlobalProperties["FoO"].ShouldBe("bar");
543
GetFirstNodeWithProjectNumber(graph, 4).
ProjectReferences
.First().ShouldNotBe(GetFirstNodeWithProjectNumber(graph, 2).
ProjectReferences
.First());
544
GetFirstNodeWithProjectNumber(graph, 4).
ProjectReferences
.First().ProjectInstance.FullPath.ShouldEndWith("5.proj");
545
GetFirstNodeWithProjectNumber(graph, 4).
ProjectReferences
.First().ProjectInstance.GlobalProperties["FoO"].ShouldBe("BAR");
584
node1.
ProjectReferences
.Count.ShouldBe(1);
585
node1.
ProjectReferences
.First().ShouldBe(node3);
586
node2.
ProjectReferences
.Count.ShouldBe(1);
587
node2.
ProjectReferences
.First().ShouldBe(node3);
616
entryPointNode1.
ProjectReferences
.Count.ShouldBe(1);
617
entryPointNode2.
ProjectReferences
.Count.ShouldBe(1);
618
entryPointNode1.
ProjectReferences
.First().ShouldNotBe(entryPointNode2.
ProjectReferences
.First());
619
entryPointNode1.
ProjectReferences
.First().ProjectInstance.FullPath.ShouldBe(entryPointNode2.
ProjectReferences
.First().ProjectInstance.FullPath);
620
entryPointNode1.
ProjectReferences
.First().ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86");
621
entryPointNode2.
ProjectReferences
.First().ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64");
655
entryPointNode1.
ProjectReferences
.Count.ShouldBe(1);
656
entryPointNode2.
ProjectReferences
.Count.ShouldBe(1);
657
entryPointNode1.
ProjectReferences
.First().ShouldBe(entryPointNode2.
ProjectReferences
.First());
658
entryPointNode1.
ProjectReferences
.First().ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse();
871
project1Node.
ProjectReferences
.Count.ShouldBe(3);
872
project1Node.
ProjectReferences
.Select(node => node.ProjectInstance.FullPath).ShouldBe(new[] { project2Path, project3Path, project8Path }, ignoreOrder: true);
877
project2Node.
ProjectReferences
.Count.ShouldBe(1);
878
project2Node.
ProjectReferences
.Select(node => node.ProjectInstance.FullPath).ShouldBe(new[] { project4Path }, ignoreOrder: true);
883
project3Node.
ProjectReferences
.Count.ShouldBe(1);
884
project3Node.
ProjectReferences
.Select(node => node.ProjectInstance.FullPath).ShouldBe(new[] { project5Path }, ignoreOrder: true);
890
project4Node.
ProjectReferences
.Count.ShouldBe(0);
896
project5Node.
ProjectReferences
.Count.ShouldBe(0);
902
project6Node.
ProjectReferences
.Count.ShouldBe(0);
910
project8Node.
ProjectReferences
.Count.ShouldBe(0);
1865
foreach (var reference in node.
ProjectReferences
)
2107
innerBuildWithCommonReferences.
ProjectReferences
.Count.ShouldBe(4);
2108
var referenceNumbersSet = innerBuildWithCommonReferences.
ProjectReferences
.Select(r => Path.GetFileNameWithoutExtension(r.ProjectInstance.FullPath)).ToHashSet();
2113
innerBuildWithAdditionalReferences.
ProjectReferences
.Count.ShouldBe(8);
2114
referenceNumbersSet = innerBuildWithAdditionalReferences.
ProjectReferences
.Select(r => Path.GetFileNameWithoutExtension(r.ProjectInstance.FullPath)).ToHashSet();
2147
two.
ProjectReferences
.ShouldHaveSingleItem();
2148
two.
ProjectReferences
.First().ShouldBe(referencedInnerBuild);
2175
rootNode.
ProjectReferences
.ShouldHaveSingleItem();
2176
var innerBuildNode = rootNode.
ProjectReferences
.First();
2180
innerBuildNode.
ProjectReferences
.ShouldHaveSingleItem();
2181
AssertNonMultitargetingNode(innerBuildNode.
ProjectReferences
.First(), additionalGlobalProperties);
2220
var innerBuild1WithReferenceToInnerBuild2 = outerBuild1.
ProjectReferences
.FirstOrDefault(n => n.ProjectType == ProjectInterpretation.ProjectType.InnerBuild && n.ProjectInstance.GlobalProperties[InnerBuildPropertyName] == "a");
2235
innerBuild1WithReferenceToInnerBuild2.
ProjectReferences
.ShouldBeSameIgnoringOrder(new[] { outerBuild2, innerBuild2 });
2368
node.
ProjectReferences
.ShouldBeSameIgnoringOrder(expectedClosure);
2701
project1.
ProjectReferences
.ShouldHaveSingleItem().ShouldBe(project2);
2743
project1.
ProjectReferences
.ShouldHaveSingleItem().ShouldBe(project2);
Graph\ResultCacheBasedBuilds_Tests.cs (2)
452
var cacheFilesForReferences = node.
ProjectReferences
.Where(r => outputCaches.ContainsKey(r)).Select(r => outputCaches[r]).ToArray();
498
foreach (var referenceOutput in node.
ProjectReferences
.SelectMany(n => expectedNodeBuildOutput[n]))
ProjectCache\ProjectCacheTests.cs (2)
539
logger.FullLog.ShouldContain($"EntryPoint: {graph.GraphRoots.First().
ProjectReferences
.First().ProjectInstance.FullPath}");
697
var referenceBuildTasks = rootNode.
ProjectReferences
.Select(