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