73 references to GlobalProperties
Microsoft.Build (6)
BackEnd\Shared\BuildResult.cs (2)
132/// be used to retrieve <see cref="ProjectInstance.Properties"/>, <see cref="ProjectInstance.GlobalProperties"/> and 408/// be used to retrieve <see cref="ProjectInstance.Properties"/>, <see cref="ProjectInstance.GlobalProperties"/> and
Graph\GraphBuildRequestData.cs (1)
221return node.ProjectInstance.GlobalProperties.AsReadOnly();
Graph\ProjectGraph.cs (1)
521node.ProjectInstance.GlobalProperties.OrderBy(kvp => kvp.Key)
Graph\ProjectGraphNode.cs (1)
56$"{truncatedProjectFile}, #GlobalProps={ProjectInstance.GlobalProperties.Count}, #Props={ProjectInstance.Properties.Count}, #Items={ProjectInstance.Items.Count}, #in={ReferencingProjects.Count}, #out={ProjectReferences.Count}";
Instance\ProjectInstance.cs (1)
2327/// Replaces the project state (<see cref="GlobalProperties"/>, <see cref="Properties"/> and <see cref="Items"/>) with that
Microsoft.Build.Engine.UnitTests (65)
BackEnd\BuildManager_Tests.cs (2)
3709Assert.Empty(mainInstance.GlobalProperties); 3744Assert.Empty(p2pInstance.GlobalProperties);
BackEnd\BuildRequestConfiguration_Tests.cs (4)
371Assert.Equal("3", instance.GlobalProperties["ThreeIn"]); 372Assert.Equal("bazfile", instance.GlobalProperties["BazIn"]); 399Assert.Equal("3", instance.GlobalProperties["ThreeIn"]); 400Assert.Equal("bazfile", instance.GlobalProperties["BazIn"]);
Graph\GetCompatiblePlatformGraph_Tests.cs (12)
60GetFirstNodeWithProjectNumber(graph, 1).ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse(); 100GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 101GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 142GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse(); 143GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 182GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("AnyCPU"); 183GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["Platform"].ShouldBe("AnyCPU"); 211GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64"); 239GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 266GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("AnyCPU"); 294GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 324GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse();
Graph\GraphLoadedFromSolution_tests.cs (2)
718return node.ProjectInstance.GlobalProperties["Configuration"]; 723return node.ProjectInstance.GlobalProperties["Platform"];
Graph\GraphTestingUtilities.cs (4)
60string expectedPropertiesMetadata = $"{InnerBuildPropertyName}={innerBuild.ProjectInstance.GlobalProperties[InnerBuildPropertyName]}"; 95node.ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(EmptyGlobalProperties.AddRange(additionalGlobalProperties)); 106outerBuild.ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(EmptyGlobalProperties.AddRange(additionalGlobalProperties)); 124innerBuild.ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(
Graph\ProjectGraph_Tests.cs (39)
372root1.ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor1); 373root1.ProjectReferences.First(r => GetProjectNumber(r) == 3).ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor1); 374root1.ProjectReferences.First(r => GetProjectNumber(r) == 4).ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor1); 379root2.ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor2); 380root2.ProjectReferences.First(r => GetProjectNumber(r) == 4).ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor2); 381root2.ProjectReferences.First(r => GetProjectNumber(r) == 5).ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor2); 411GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First().ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(EmptyGlobalProperties); 413GetFirstNodeWithProjectNumber(graph, 3).ProjectReferences.First().ProjectInstance.GlobalProperties.Count.ShouldBeGreaterThan(1); 432GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["A"].ShouldBe("B"); 540GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First().ProjectInstance.GlobalProperties["FoO"].ShouldBe("bar"); 545GetFirstNodeWithProjectNumber(graph, 4).ProjectReferences.First().ProjectInstance.GlobalProperties["FoO"].ShouldBe("BAR"); 612entryPointNode1.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 613entryPointNode2.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64"); 620entryPointNode1.ProjectReferences.First().ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 621entryPointNode2.ProjectReferences.First().ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64"); 651entryPointNode1.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 652entryPointNode2.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64"); 658entryPointNode1.ProjectReferences.First().ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse(); 869project1Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 870project1Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 875project2Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 876project2Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("Win32"); 881project3Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 882project3Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("Win32"); 888project4Node.ProjectInstance.GlobalProperties.ContainsKey("Configuration").ShouldBeFalse(); 889project4Node.ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse(); 894project5Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 895project5Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("Win32"); 900project6Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 901project6Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 908project8Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 909project8Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 1860foreach (var globalProperty in node.ProjectInstance.GlobalProperties) 2105var innerBuildWithCommonReferences = GetNodesWithProjectNumber(graph, 1).First(n => n.ProjectInstance.GlobalProperties.TryGetValue(InnerBuildPropertyName, out string p) && p == "a"); 2111var innerBuildWithAdditionalReferences = GetNodesWithProjectNumber(graph, 1).First(n => n.ProjectInstance.GlobalProperties.TryGetValue(InnerBuildPropertyName, out string p) && p == "b"); 2220var innerBuild1WithReferenceToInnerBuild2 = outerBuild1.ProjectReferences.FirstOrDefault(n => n.ProjectType == ProjectInterpretation.ProjectType.InnerBuild && n.ProjectInstance.GlobalProperties[InnerBuildPropertyName] == "a"); 2229innerBuild2.ProjectInstance.GlobalProperties[InnerBuildPropertyName].ShouldBe("a"); 2336node.ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(expectedGlobalProperties); 2351projectGraph.ProjectNodes.First().ProjectInstance.GlobalProperties[PropertyNames.IsGraphBuild].ShouldBe("xyz");
TestComparers\ProjectInstanceModelTestComparers.cs (2)
29Helpers.AssertDictionariesEqual(x.GlobalProperties, y.GlobalProperties);
MSBuild (2)
XMake.cs (2)
1622nodeResultKvp.Key.ProjectInstance.GlobalProperties.Count == entryPoint.GlobalProperties.Count && 1623nodeResultKvp.Key.ProjectInstance.GlobalProperties.All(propertyKvp => entryPoint.GlobalProperties.TryGetValue(propertyKvp.Key, out string entryValue) &&