172 references to ProjectsInOrder
Microsoft.Build (6)
Construction\Solution\SolutionProjectGenerator.cs (4)
271foreach (ProjectInSolution project in solutionFile.ProjectsInOrder) 737var projectsInOrder = new List<ProjectInSolution>(_solutionFile.ProjectsInOrder.Count); 738foreach (ProjectInSolution project in _solutionFile.ProjectsInOrder) 2129foreach (ProjectInSolution project in _solutionFile.ProjectsInOrder)
Graph\GraphBuilder.cs (1)
310IReadOnlyList<ProjectInSolution> projectsInSolution = Solution.ProjectsInOrder;
Graph\ProjectGraph.cs (1)
651foreach (ProjectInSolution project in Solution.ProjectsInOrder)
Microsoft.Build.Engine.OM.UnitTests (24)
Construction\SolutionFile_Tests.cs (24)
99Assert.Equal(expectedProjectName, solution.ProjectsInOrder[0].ProjectName); 100Assert.Equal(ConvertToUnixPathIfNeeded("Relative path\\to\\Project name.myvctype"), solution.ProjectsInOrder[0].RelativePath); 104Assert.Equal("{0ABED153-9451-483C-8140-9E8D7306B216}", solution.ProjectsInOrder[0].ProjectGuid); 189Assert.Equal(3, solution.ProjectsInOrder.Count); 192ProjectInSolution consoleApplication1 = solution.ProjectsInOrder.First(p => p.ProjectName == "ConsoleApplication1"); 197ProjectInSolution vbClassLibrary = solution.ProjectsInOrder.First(p => p.ProjectName == "vbClassLibrary"); 202ProjectInSolution classLibrary1 = solution.ProjectsInOrder.First(p => p.ProjectName == "ClassLibrary1"); 271Assert.Equal(3, solution.ProjectsInOrder.Count); 273var classLibrary1 = solution.ProjectsInOrder 279var myPhysicalFolderClassLibrary1 = solution.ProjectsInOrder 284var classLibrary2 = solution.ProjectsInOrder 356Assert.Equal(3, solution.ProjectsInOrder.Count); 358var classLibrary1 = solution.ProjectsInOrder.First(p => p.ProjectName == "ClassLibrary1"); 359var classLibrary2 = solution.ProjectsInOrder.First(p => p.ProjectName == "ClassLibrary2"); 360var classLibrary3 = solution.ProjectsInOrder.First(p => p.ProjectName == "ClassLibrary3"); 365Assert.Null(solution.ProjectsInOrder[0].ParentProjectGuid); 372Assert.Null(solution.ProjectsInOrder[1].ParentProjectGuid); 374Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary3\\ClassLibrary3.csproj"), solution.ProjectsInOrder[2].RelativePath); 375Assert.Empty(solution.ProjectsInOrder[2].Dependencies); 376Assert.Null(solution.ProjectsInOrder[2].ParentProjectGuid); 574ProjectInSolution csharpProject = solution.ProjectsInOrder.First(p => p.ProjectName == "ClassLibrary1"); 575ProjectInSolution vcProject = solution.ProjectsInOrder.First(p => p.ProjectName == "MainApp"); 659ProjectInSolution winFormsApp1 = solution.ProjectsInOrder.First(p => p.ProjectName == "WinFormsApp1"); 660ProjectInSolution classLibrary1 = solution.ProjectsInOrder.First(p => p.ProjectName == "ClassLibrary1");
Microsoft.Build.Engine.UnitTests (140)
Construction\SolutionFile_NewParser_Tests.cs (9)
85solution.ProjectsInOrder.ShouldHaveSingleItem(); 87solution.ProjectsInOrder[0].ProjectType.ShouldBe(SolutionProjectType.WebProject); 88solution.ProjectsInOrder[0].ProjectName.ShouldBe(@"C:\WebSites\WebApplication3\"); 89solution.ProjectsInOrder[0].RelativePath.ShouldBe(ConvertToUnixPathIfNeeded(@"C:\WebSites\WebApplication3\")); 90solution.ProjectsInOrder[0].Dependencies.Count.ShouldBe(2); 91solution.ProjectsInOrder[0].ParentProjectGuid.ShouldBeNull(); 92solution.ProjectsInOrder[0].GetUniqueProjectName().ShouldBe(@"C:\WebSites\WebApplication3\"); 94Hashtable aspNetCompilerParameters = solution.ProjectsInOrder[0].AspNetConfigurations; 122List<string> aspNetProjectReferences = solution.ProjectsInOrder[0].ProjectReferences;
Construction\SolutionFile_OldParser_Tests.cs (130)
139Assert.Equal("Project name", solution.ProjectsInOrder[0].ProjectName); 140Assert.Equal("Relative path to project file", solution.ProjectsInOrder[0].RelativePath); 141Assert.Equal("{0ABED153-9451-483C-8140-9E8D7306B216}", solution.ProjectsInOrder[0].ProjectGuid); 205solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"someproj.etp"); 206solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"ClassLibrary2.csproj"); 395solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"someproj.etp"); 396solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"someproj2.etp"); 397solution.ProjectsInOrder[2].RelativePath.ShouldBe(@"ClassLibrary1.csproj"); 610solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"someproj.etp"); 611solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"someproj2.etp"); 612solution.ProjectsInOrder[2].RelativePath.ShouldBe(@"ETPProjUpgradeTest\someproj3.etp"); 613solution.ProjectsInOrder[3].RelativePath.ShouldBe(Path.Combine("ETPProjUpgradeTest", "..", "SomeFolder", "ClassLibrary1.csproj")); 759Assert.Equal("MyProject,(=IsGreat)", solution.ProjectsInOrder[0].ProjectName); 760Assert.Equal("Relative path to project file", solution.ProjectsInOrder[0].RelativePath); 761Assert.Equal("{0ABED153-9451-483C-8140-9E8D7306B216}", solution.ProjectsInOrder[0].ProjectGuid); 981solution.ProjectsInOrder.Count.ShouldBe(4); 983solution.ProjectsInOrder[0].ProjectType.ShouldBe(SolutionProjectType.KnownToBeMSBuildFormat); 984solution.ProjectsInOrder[0].ProjectName.ShouldBe("ConsoleApplication1"); 985solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"ConsoleApplication1\ConsoleApplication1.vbproj"); 986solution.ProjectsInOrder[0].ProjectGuid.ShouldBe("{AB3413A6-D689-486D-B7F0-A095371B3F13}"); 987solution.ProjectsInOrder[0].Dependencies.ShouldBeEmpty(); 988solution.ProjectsInOrder[0].ParentProjectGuid.ShouldBeNull(); 989solution.ProjectsInOrder[0].GetUniqueProjectName().ShouldBe("ConsoleApplication1"); 991solution.ProjectsInOrder[1].ProjectType.ShouldBe(SolutionProjectType.KnownToBeMSBuildFormat); 992solution.ProjectsInOrder[1].ProjectName.ShouldBe("vbClassLibrary"); 993solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"vbClassLibrary\vbClassLibrary.vbproj"); 994solution.ProjectsInOrder[1].ProjectGuid.ShouldBe("{BA333A76-4511-47B8-8DF4-CA51C303AD0B}"); 995solution.ProjectsInOrder[1].Dependencies.ShouldBeEmpty(); 996solution.ProjectsInOrder[1].ParentProjectGuid.ShouldBeNull(); 997solution.ProjectsInOrder[1].GetUniqueProjectName().ShouldBe("vbClassLibrary"); 999solution.ProjectsInOrder[2].ProjectType.ShouldBe(SolutionProjectType.KnownToBeMSBuildFormat); 1000solution.ProjectsInOrder[2].ProjectName.ShouldBe("ClassLibrary1"); 1001solution.ProjectsInOrder[2].RelativePath.ShouldBe(@"ClassLibrary1\ClassLibrary1.csproj"); 1002solution.ProjectsInOrder[2].ProjectGuid.ShouldBe("{DEBCE986-61B9-435E-8018-44B9EF751655}"); 1003solution.ProjectsInOrder[2].Dependencies.ShouldBeEmpty(); 1004solution.ProjectsInOrder[2].ParentProjectGuid.ShouldBeNull(); 1005solution.ProjectsInOrder[2].GetUniqueProjectName().ShouldBe("ClassLibrary1"); 1007solution.ProjectsInOrder[3].ProjectType.ShouldBe(SolutionProjectType.KnownToBeMSBuildFormat); 1008solution.ProjectsInOrder[3].ProjectName.ShouldBe("cpsFsProject"); 1009solution.ProjectsInOrder[3].RelativePath.ShouldBe(@"cpsFsProject\ProjectFileName.fsproj"); 1010solution.ProjectsInOrder[3].ProjectGuid.ShouldBe("{9200923E-1814-4E76-A677-C61E4896D67F}"); 1011solution.ProjectsInOrder[3].Dependencies.ShouldBeEmpty(); 1012solution.ProjectsInOrder[3].ParentProjectGuid.ShouldBeNull(); 1013solution.ProjectsInOrder[3].GetUniqueProjectName().ShouldBe("cpsFsProject"); 1069solution.ProjectsInOrder.Count.ShouldBe(5); 1071solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"ClassLibrary1\ClassLibrary1.csproj"); 1072solution.ProjectsInOrder[0].ProjectGuid.ShouldBe("{34E0D07D-CF8F-459D-9449-C4188D8C5564}"); 1073solution.ProjectsInOrder[0].Dependencies.ShouldBeEmpty(); 1074solution.ProjectsInOrder[0].ParentProjectGuid.ShouldBeNull(); 1075solution.ProjectsInOrder[0].GetUniqueProjectName().ShouldBe("ClassLibrary1"); 1077solution.ProjectsInOrder[1].ProjectType.ShouldBe(SolutionProjectType.SolutionFolder); 1078solution.ProjectsInOrder[1].ProjectGuid.ShouldBe("{E0F97730-25D2-418A-A7BD-02CAFDC6E470}"); 1079solution.ProjectsInOrder[1].Dependencies.ShouldBeEmpty(); 1080solution.ProjectsInOrder[1].ParentProjectGuid.ShouldBeNull(); 1081solution.ProjectsInOrder[1].GetUniqueProjectName().ShouldBe("MySlnFolder"); 1083solution.ProjectsInOrder[2].RelativePath.ShouldBe(@"MyPhysicalFolder\ClassLibrary1\ClassLibrary1.csproj"); 1084solution.ProjectsInOrder[2].ProjectGuid.ShouldBe("{A5EE8128-B08E-4533-86C5-E46714981680}"); 1085solution.ProjectsInOrder[2].Dependencies.ShouldBeEmpty(); 1086solution.ProjectsInOrder[2].ParentProjectGuid.ShouldBe("{E0F97730-25D2-418A-A7BD-02CAFDC6E470}"); 1087solution.ProjectsInOrder[2].GetUniqueProjectName().ShouldBe(@"MySlnFolder\ClassLibrary1"); 1089solution.ProjectsInOrder[3].ProjectType.ShouldBe(SolutionProjectType.SolutionFolder); 1090solution.ProjectsInOrder[3].ProjectGuid.ShouldBe("{2AE8D6C4-FB43-430C-8AEB-15E5EEDAAE4B}"); 1091solution.ProjectsInOrder[3].Dependencies.ShouldBeEmpty(); 1092solution.ProjectsInOrder[3].ParentProjectGuid.ShouldBe("{E0F97730-25D2-418A-A7BD-02CAFDC6E470}"); 1093solution.ProjectsInOrder[3].GetUniqueProjectName().ShouldBe(@"MySlnFolder\MySubSlnFolder"); 1095solution.ProjectsInOrder[4].RelativePath.ShouldBe(@"ClassLibrary2\ClassLibrary2.csproj"); 1096solution.ProjectsInOrder[4].ProjectGuid.ShouldBe("{6DB98C35-FDCC-4818-B5D4-1F0A385FDFD4}"); 1097solution.ProjectsInOrder[4].Dependencies.ShouldBeEmpty(); 1098solution.ProjectsInOrder[4].ParentProjectGuid.ShouldBe("{2AE8D6C4-FB43-430C-8AEB-15E5EEDAAE4B}"); 1099solution.ProjectsInOrder[4].GetUniqueProjectName().ShouldBe(@"MySlnFolder\MySubSlnFolder\ClassLibrary2"); 1386solution.ProjectsInOrder.Count.ShouldBe(6); 1388solution.ProjectsInOrder[0].ProjectGuid.ShouldBe("{892B5932-9AA8-46F9-A857-8967DCDBE4F5}"); 1389solution.ProjectsInOrder[0].ProjectName.ShouldBe("HubApp2"); 1390SolutionFile.IsBuildableProject(solution.ProjectsInOrder[0]).ShouldBeFalse(); 1392solution.ProjectsInOrder[1].ProjectGuid.ShouldBe("{A5526AEA-E0A2-496D-94B7-2BBE835C83F8}"); 1393solution.ProjectsInOrder[1].ProjectName.ShouldBe("HubApp2.Store"); 1394SolutionFile.IsBuildableProject(solution.ProjectsInOrder[1]).ShouldBeTrue(); 1396solution.ProjectsInOrder[2].ProjectGuid.ShouldBe("{FF6AEDF3-950A-46DD-910B-52BC69B9C99A}"); 1397solution.ProjectsInOrder[2].ProjectName.ShouldBe("Shared"); 1398SolutionFile.IsBuildableProject(solution.ProjectsInOrder[2]).ShouldBeFalse(); 1400solution.ProjectsInOrder[3].ProjectGuid.ShouldBe("{024E8607-06B0-440D-8741-5A888DC4B176}"); 1401solution.ProjectsInOrder[3].ProjectName.ShouldBe("HubApp2.Phone"); 1402SolutionFile.IsBuildableProject(solution.ProjectsInOrder[3]).ShouldBeTrue(); 1404solution.ProjectsInOrder[4].ProjectGuid.ShouldBe("{E0F97730-25D2-418A-A7BD-02CAFDC6E470}"); 1405solution.ProjectsInOrder[4].ProjectName.ShouldBe("MySlnFolder"); 1406SolutionFile.IsBuildableProject(solution.ProjectsInOrder[4]).ShouldBeFalse(); 1410solution.ProjectsInOrder[5].ProjectGuid.ShouldBe("{A5EE8128-B08E-4533-86C5-E46714981680}"); 1411solution.ProjectsInOrder[5].ProjectName.ShouldBe("ClassLibrary1"); 1412SolutionFile.IsBuildableProject(solution.ProjectsInOrder[5]).ShouldBeTrue(); 1466solution.ProjectsInOrder.Count.ShouldBe(3); 1468solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"ClassLibrary1\ClassLibrary1.csproj"); 1469solution.ProjectsInOrder[0].ProjectGuid.ShouldBe("{05A5AD00-71B5-4612-AF2F-9EA9121C4111}"); 1470solution.ProjectsInOrder[0].Dependencies.ShouldHaveSingleItem(); 1471solution.ProjectsInOrder[0].Dependencies[0].ShouldBe("{FAB4EE06-6E01-495A-8926-5514599E3DD9}"); 1472solution.ProjectsInOrder[0].ParentProjectGuid.ShouldBeNull(); 1473solution.ProjectsInOrder[0].GetUniqueProjectName().ShouldBe("ClassLibrary1"); 1475solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"ClassLibrary2\ClassLibrary2.csproj"); 1476solution.ProjectsInOrder[1].ProjectGuid.ShouldBe("{7F316407-AE3E-4F26-BE61-2C50D30DA158}"); 1477solution.ProjectsInOrder[1].Dependencies.Count.ShouldBe(2); 1478solution.ProjectsInOrder[1].Dependencies[0].ShouldBe("{FAB4EE06-6E01-495A-8926-5514599E3DD9}"); 1479solution.ProjectsInOrder[1].Dependencies[1].ShouldBe("{05A5AD00-71B5-4612-AF2F-9EA9121C4111}"); 1480solution.ProjectsInOrder[1].ParentProjectGuid.ShouldBeNull(); 1481solution.ProjectsInOrder[1].GetUniqueProjectName().ShouldBe("ClassLibrary2"); 1483solution.ProjectsInOrder[2].RelativePath.ShouldBe(@"ClassLibrary3\ClassLibrary3.csproj"); 1484solution.ProjectsInOrder[2].ProjectGuid.ShouldBe("{FAB4EE06-6E01-495A-8926-5514599E3DD9}"); 1485solution.ProjectsInOrder[2].Dependencies.ShouldBeEmpty(); 1486solution.ProjectsInOrder[2].ParentProjectGuid.ShouldBeNull(); 1487solution.ProjectsInOrder[2].GetUniqueProjectName().ShouldBe("ClassLibrary3"); 1541solution.ProjectsInOrder.ShouldHaveSingleItem(); 1543solution.ProjectsInOrder[0].ProjectType.ShouldBe(SolutionProjectType.WebProject); 1544solution.ProjectsInOrder[0].ProjectName.ShouldBe(@"C:\WebSites\WebApplication3\"); 1545solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"C:\WebSites\WebApplication3\"); 1546solution.ProjectsInOrder[0].ProjectGuid.ShouldBe("{464FD0B9-E335-4677-BE1E-6B2F982F4D86}"); 1547solution.ProjectsInOrder[0].Dependencies.Count.ShouldBe(2); 1548solution.ProjectsInOrder[0].ParentProjectGuid.ShouldBeNull(); 1549solution.ProjectsInOrder[0].GetUniqueProjectName().ShouldBe(@"C:\WebSites\WebApplication3\"); 1551Hashtable aspNetCompilerParameters = solution.ProjectsInOrder[0].AspNetConfigurations; 1579List<string> aspNetProjectReferences = solution.ProjectsInOrder[0].ProjectReferences; 1624solution.ProjectsInOrder.Count.ShouldBe(3); 1626solution.ProjectsInOrder[0].ProjectType.ShouldBe(SolutionProjectType.WebProject); 1627solution.ProjectsInOrder[0].GetUniqueProjectName().ShouldBe(@"C:\WebSites\WebApplication3\"); 1629solution.ProjectsInOrder[1].ProjectType.ShouldBe(SolutionProjectType.SolutionFolder); 1630solution.ProjectsInOrder[1].ProjectGuid.ShouldBe("{092FE6E5-71F8-43F7-9C92-30E3124B8A22}"); 1632solution.ProjectsInOrder[2].ProjectType.ShouldBe(SolutionProjectType.WebProject); 1633solution.ProjectsInOrder[2].GetUniqueProjectName().ShouldBe(@"C:\WebSites\WebApplication4\"); 1634solution.ProjectsInOrder[2].ParentProjectGuid.ShouldBe("{092FE6E5-71F8-43F7-9C92-30E3124B8A22}"); 2427solution.ProjectsInOrder[0].ProjectName.ShouldBe("ProjectA"); 2428solution.ProjectsInOrder[0].RelativePath.ShouldBe(expectedRelativePath); 2429solution.ProjectsInOrder[0].AbsolutePath.ShouldBe(Path.GetFullPath(Path.Combine(Path.GetDirectoryName(solution.FullPath)!, expectedRelativePath))); 2430solution.ProjectsInOrder[0].ProjectGuid.ShouldBe("{0ABED153-9451-483C-8140-9E8D7306B216}");
Construction\SolutionProjectGenerator_Tests.cs (1)
2755ProjectInSolution projectInSolution = solution.ProjectsInOrder.ShouldHaveSingleItem();
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.cs (1)
198foreach (var project in solutionFile.ProjectsInOrder)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
BuildHost.cs (1)
150foreach (var project in SolutionFile.Parse(solutionFilePath).ProjectsInOrder)