73 references to GlobalProperties
Microsoft.Build (6)
BackEnd\Shared\BuildResult.cs (2)
134/// be used to retrieve <see cref="ProjectInstance.Properties"/>, <see cref="ProjectInstance.GlobalProperties"/> and 410/// be used to retrieve <see cref="ProjectInstance.Properties"/>, <see cref="ProjectInstance.GlobalProperties"/> and
Graph\GraphBuildRequestData.cs (1)
222return node.ProjectInstance.GlobalProperties.AsReadOnly();
Graph\ProjectGraph.cs (1)
521node.ProjectInstance.GlobalProperties.OrderBy(kvp => kvp.Key)
Graph\ProjectGraphNode.cs (1)
55$"{truncatedProjectFile}, #GlobalProps={ProjectInstance.GlobalProperties.Count}, #Props={ProjectInstance.Properties.Count}, #Items={ProjectInstance.Items.Count}, #in={ReferencingProjects.Count}, #out={ProjectReferences.Count}";
Instance\ProjectInstance.cs (1)
2410/// 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)
3708Assert.Empty(mainInstance.GlobalProperties); 3743Assert.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)
49GetFirstNodeWithProjectNumber(graph, 1).ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse(); 89GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 90GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 131GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse(); 132GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 171GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("AnyCPU"); 172GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["Platform"].ShouldBe("AnyCPU"); 200GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64"); 228GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 255GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("AnyCPU"); 283GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 313GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse();
Graph\GraphLoadedFromSolution_tests.cs (2)
717return node.ProjectInstance.GlobalProperties["Configuration"]; 722return 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)
373root1.ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor1); 374root1.ProjectReferences.First(r => GetProjectNumber(r) == 3).ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor1); 375root1.ProjectReferences.First(r => GetProjectNumber(r) == 4).ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor1); 380root2.ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor2); 381root2.ProjectReferences.First(r => GetProjectNumber(r) == 4).ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor2); 382root2.ProjectReferences.First(r => GetProjectNumber(r) == 5).ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(globalPropertiesFor2); 412GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First().ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(EmptyGlobalProperties); 414GetFirstNodeWithProjectNumber(graph, 3).ProjectReferences.First().ProjectInstance.GlobalProperties.Count.ShouldBeGreaterThan(1); 433GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["A"].ShouldBe("B"); 541GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First().ProjectInstance.GlobalProperties["FoO"].ShouldBe("bar"); 546GetFirstNodeWithProjectNumber(graph, 4).ProjectReferences.First().ProjectInstance.GlobalProperties["FoO"].ShouldBe("BAR"); 613entryPointNode1.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 614entryPointNode2.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64"); 621entryPointNode1.ProjectReferences.First().ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 622entryPointNode2.ProjectReferences.First().ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64"); 652entryPointNode1.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 653entryPointNode2.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64"); 659entryPointNode1.ProjectReferences.First().ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse(); 870project1Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 871project1Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 876project2Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 877project2Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("Win32"); 882project3Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 883project3Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("Win32"); 889project4Node.ProjectInstance.GlobalProperties.ContainsKey("Configuration").ShouldBeFalse(); 890project4Node.ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse(); 895project5Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 896project5Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("Win32"); 901project6Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 902project6Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 909project8Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 910project8Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 1861foreach (var globalProperty in node.ProjectInstance.GlobalProperties) 2106var innerBuildWithCommonReferences = GetNodesWithProjectNumber(graph, 1).First(n => n.ProjectInstance.GlobalProperties.TryGetValue(InnerBuildPropertyName, out string p) && p == "a"); 2112var innerBuildWithAdditionalReferences = GetNodesWithProjectNumber(graph, 1).First(n => n.ProjectInstance.GlobalProperties.TryGetValue(InnerBuildPropertyName, out string p) && p == "b"); 2221var innerBuild1WithReferenceToInnerBuild2 = outerBuild1.ProjectReferences.FirstOrDefault(n => n.ProjectType == ProjectInterpretation.ProjectType.InnerBuild && n.ProjectInstance.GlobalProperties[InnerBuildPropertyName] == "a"); 2230innerBuild2.ProjectInstance.GlobalProperties[InnerBuildPropertyName].ShouldBe("a"); 2337node.ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(expectedGlobalProperties); 2352projectGraph.ProjectNodes.First().ProjectInstance.GlobalProperties[PropertyNames.IsGraphBuild].ShouldBe("xyz");
TestComparers\ProjectInstanceModelTestComparers.cs (2)
29Helpers.AssertDictionariesEqual(x.GlobalProperties, y.GlobalProperties);
MSBuild (2)
XMake.cs (2)
1579nodeResultKvp.Key.ProjectInstance.GlobalProperties.Count == entryPoint.GlobalProperties.Count && 1580nodeResultKvp.Key.ProjectInstance.GlobalProperties.All(propertyKvp => entryPoint.GlobalProperties.TryGetValue(propertyKvp.Key, out string entryValue) &&