198 references to GetPropertyValue
Microsoft.Build (2)
Construction\Solution\SolutionProjectGenerator.cs (1)
2167
string referencedWebProjectGuid = msbuildProject.
GetPropertyValue
("SourceWebProject");
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (1)
169
/// Facilitate remoting the <see cref="Project.
GetPropertyValue
"/>.
Microsoft.Build.Engine.OM.UnitTests (53)
Construction\ProjectChooseElement_Tests.cs (2)
278
Assert.Equal("v1", project.
GetPropertyValue
("p"));
282
Assert.Equal(String.Empty, project.
GetPropertyValue
("p"));
Construction\ProjectImportElement_Tests.cs (4)
180
Assert.Equal("v1", project.
GetPropertyValue
("p"));
184
Assert.Equal("v2", project.
GetPropertyValue
("p"));
218
Assert.Equal("v1", project.
GetPropertyValue
("p"));
222
Assert.Equal(String.Empty, project.
GetPropertyValue
("p"));
Construction\ProjectRootElement_Tests.cs (2)
1754
projectFileAssert.Invoke(initialLocation, reloadLocation, project.
GetPropertyValue
("ProjectFile"));
1755
projectFileAssert.Invoke(initialLocation, reloadLocation, project.
GetPropertyValue
("ThisFile"));
Definition\DefinitionEditing_Tests.cs (7)
1482
Assert.Equal("v1", project.
GetPropertyValue
("p1"));
1507
Assert.Equal("v^1", project.
GetPropertyValue
("p1"));
1528
Assert.Equal("foo", project.
GetPropertyValue
("OutDir"));
1542
Assert.Equal("v0", project.
GetPropertyValue
("p1"));
1558
Assert.Equal("x@(i)x%(m)x", project.
GetPropertyValue
("p1"));
1786
Assert.Equal("v2", project.
GetPropertyValue
("p"));
1805
Assert.Equal("v2", project.
GetPropertyValue
("p"));
Definition\Project_Tests.cs (32)
372
project.
GetPropertyValue
("q").ShouldBe("1");
596
project.
GetPropertyValue
("p2").ShouldBe("v3");
852
project.
GetPropertyValue
("p").ShouldBe(string.Empty);
857
project.
GetPropertyValue
("p").ShouldBe("v0");
872
project.
GetPropertyValue
("p").ShouldBe("v2");
885
project.
GetPropertyValue
("p").ShouldBe("v1");
892
project.
GetPropertyValue
("p1").ShouldBe(string.Empty);
897
project.
GetPropertyValue
("p1").ShouldBe("v0");
924
project.
GetPropertyValue
("computername").ShouldBe("v1");
929
project.
GetPropertyValue
("computername").ShouldBe("v1");
957
project.
GetPropertyValue
("pp").ShouldBe(string.Empty);
962
project.
GetPropertyValue
("pp").ShouldBe("vv");
986
project.
GetPropertyValue
("pp").ShouldBe(string.Empty);
991
project.
GetPropertyValue
("pp").ShouldBe("vv");
1023
project.
GetPropertyValue
("p").ShouldBe(string.Empty);
1029
project.
GetPropertyValue
("p").ShouldBe("v0");
1170
project.
GetPropertyValue
("msbuildtoolsversion").ShouldBe(ObjectModelHelpers.MSBuildDefaultToolsVersion);
1175
project.
GetPropertyValue
("msbuildtoolsversion").ShouldBe(ObjectModelHelpers.MSBuildDefaultToolsVersion);
1180
project.
GetPropertyValue
("msbuildtoolsversion").ShouldBe(ObjectModelHelpers.MSBuildDefaultToolsVersion);
1192
project.
GetPropertyValue
("msbuildtoolsversion").ShouldBe(ObjectModelHelpers.MSBuildDefaultToolsVersion);
1230
p.
GetPropertyValue
("VisualStudioVersion").ShouldBe(t.DefaultSubToolsetVersion ?? MSBuildConstants.CurrentVisualStudioVersion);
1255
p.
GetPropertyValue
("VisualStudioVersion").ShouldBe("ABCD");
1282
p.
GetPropertyValue
("VisualStudioVersion").ShouldBe("ABCDE");
1313
p.
GetPropertyValue
("VisualStudioVersion").ShouldBe("ABCDEF");
1397
project.
GetPropertyValue
("p").ShouldBe("v");
1487
project.
GetPropertyValue
("P").ShouldBe(p);
1571
project.
GetPropertyValue
("P").ShouldBe(p);
1840
project.
GetPropertyValue
("p").ShouldBe("v1");
1875
project.
GetPropertyValue
("p").ShouldBe("v2");
1910
project.
GetPropertyValue
("p").ShouldBe("v2");
1958
project.
GetPropertyValue
("p").ShouldBe("@(i);v1");
1959
project.
GetPropertyValue
("q").ShouldBe("@(j);v1");
Definition\ProjectProperty_Tests.cs (2)
229
Assert.Equal("v0", project.
GetPropertyValue
("p1"));
248
Assert.Equal("@(i)-%(m)", project.
GetPropertyValue
("p1"));
Definition\ProtectImports_Tests.cs (1)
154
Assert.Equal(NewValue, project.
GetPropertyValue
(PropertyName));
ObjectModelRemoting\Helpers\ViewValidation.evaluation.cs (2)
23
Assert.Equal(value, this.View.
GetPropertyValue
(name));
24
Assert.Equal(value, this.Real.
GetPropertyValue
(name));
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectLink.cs (1)
92
public string GetPropertyValue(string name) => this.Source.
GetPropertyValue
(name);
Microsoft.Build.Engine.UnitTests (84)
Construction\SolutionProjectGenerator_Tests.cs (5)
838
string solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
1084
string solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
1104
solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
1152
string solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
1195
string solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
Definition\Project_Internal_Tests.cs (6)
186
Assert.Equal("2.0", project.
GetPropertyValue
("msbuildtoolsversion"));
189
Assert.Equal("2.0", project.
GetPropertyValue
("msbuildtoolsversion"));
195
project.
GetPropertyValue
("msbuildtoolsversion"));
285
project.
GetPropertyValue
(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase);
313
project.
GetPropertyValue
(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase);
343
project.
GetPropertyValue
(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase);
Definition\ProjectEvaluationContext_Tests.cs (3)
822
project.
GetPropertyValue
("p").ShouldBe("val");
829
project.
GetPropertyValue
("p").ShouldBe("val");
833
project.
GetPropertyValue
("p").ShouldBeEmpty();
Evaluation\Evaluator_Tests.cs (54)
1066
Assert.Equal("dt", project.
GetPropertyValue
("msbuildprojectdefaulttargets"));
1070
Assert.Equal("dt", project.
GetPropertyValue
("msbuildprojectdefaulttargets"));
1075
Assert.Equal("dt", project.
GetPropertyValue
("msbuildprojectdefaulttargets"));
1080
Assert.Equal("dt2", project.
GetPropertyValue
("msbuildprojectdefaulttargets"));
2391
Assert.Equal(project.
GetPropertyValue
(specialPropertyName32), project.
GetPropertyValue
(specialPropertyName));
2424
Assert.Equal(@"c:\foo\bar", project.
GetPropertyValue
("MSBuildExtensionsPath"));
2446
Assert.Equal(@"c:\devdiv\vscore\msbuild", project.
GetPropertyValue
("MSBuildExtensionsPath"));
2496
string msbuildExtensionsPath32Value = project.
GetPropertyValue
("MSBuildExtensionsPath32");
2516
string msbuildExtensionsPath32Value = project.
GetPropertyValue
("MSBuildExtensionsPath32");
2569
string msbuildExtensionsPath64Value = project.
GetPropertyValue
("MSBuildExtensionsPath64");
2589
string msbuildExtensionsPath64Value = project.
GetPropertyValue
("MSBuildExtensionsPath64");
2608
Assert.Equal(expected, project.
GetPropertyValue
("LocalAppData"));
2624
string localAppDataValue = project.
GetPropertyValue
("LocalAppData");
2644
string localAppDataValue = project.
GetPropertyValue
("LocalAppData");
2655
Version.TryParse(project.
GetPropertyValue
("MSBuildAssemblyVersion"), out Version assemblyVersionAsVersion).ShouldBeTrue();
2672
string msbuildVersionProperty = project.
GetPropertyValue
("MSBuildVersion");
2673
string msbuildFileVersionProperty = project.
GetPropertyValue
("MSBuildFileVersion");
2674
string msbuildSemanticVersionProperty = project.
GetPropertyValue
("MSBuildSemanticVersion");
2707
Assert.Equal(@"c:\foo", project.
GetPropertyValue
("MSBuildProjectDirectory"));
2708
Assert.Equal(@"foo", project.
GetPropertyValue
("MSBuildProjectDirectoryNoRoot"));
2709
Assert.Equal("bar.csproj", project.
GetPropertyValue
("MSBuildProjectFile"));
2710
Assert.Equal(".csproj", project.
GetPropertyValue
("MSBuildProjectExtension"));
2711
Assert.Equal(@"c:\foo\bar.csproj", project.
GetPropertyValue
("MSBuildProjectFullPath"));
2712
Assert.Equal("bar", project.
GetPropertyValue
("MSBuildProjectName"));
2726
Assert.Equal(dir, project.
GetPropertyValue
("MSBuildProjectDirectory"));
2727
Assert.Equal(string.Empty, project.
GetPropertyValue
("MSBuildProjectDirectoryNoRoot"));
2728
Assert.Equal("bar.csproj", project.
GetPropertyValue
("MSBuildProjectFile"));
2729
Assert.Equal(".csproj", project.
GetPropertyValue
("MSBuildProjectExtension"));
2730
Assert.Equal(file, project.
GetPropertyValue
("MSBuildProjectFullPath"));
2731
Assert.Equal("bar", project.
GetPropertyValue
("MSBuildProjectName"));
2744
Assert.Equal(@"\\foo\bar", project.
GetPropertyValue
("MSBuildProjectDirectory"));
2745
Assert.Equal(string.Empty, project.
GetPropertyValue
("MSBuildProjectDirectoryNoRoot"));
2746
Assert.Equal("baz.csproj", project.
GetPropertyValue
("MSBuildProjectFile"));
2747
Assert.Equal(".csproj", project.
GetPropertyValue
("MSBuildProjectExtension"));
2748
Assert.Equal(@"\\foo\bar\baz.csproj", project.
GetPropertyValue
("MSBuildProjectFullPath"));
2749
Assert.Equal("baz", project.
GetPropertyValue
("MSBuildProjectName"));
2762
Assert.Equal(@"\\foo\bar\baz", project.
GetPropertyValue
("MSBuildProjectDirectory"));
2763
Assert.Equal(@"baz", project.
GetPropertyValue
("MSBuildProjectDirectoryNoRoot"));
2764
Assert.Equal("biz.csproj", project.
GetPropertyValue
("MSBuildProjectFile"));
2765
Assert.Equal(".csproj", project.
GetPropertyValue
("MSBuildProjectExtension"));
2766
Assert.Equal(@"\\foo\bar\baz\biz.csproj", project.
GetPropertyValue
("MSBuildProjectFullPath"));
2767
Assert.Equal("biz", project.
GetPropertyValue
("MSBuildProjectName"));
3167
Assert.Equal("BazBar", project.
GetPropertyValue
("Foo"));
3198
Assert.Equal("BazGoo", project.
GetPropertyValue
("Foo"));
3200
Assert.Equal("FooGoo", project.
GetPropertyValue
("Goo"));
3206
Assert.Equal("BazGoo", project.
GetPropertyValue
("Foo"));
3208
Assert.Equal("Foo", project.
GetPropertyValue
("Goo"));
3232
Assert.Equal("Bar", project.
GetPropertyValue
("Foo"));
3238
Assert.Equal("BazBar", project.
GetPropertyValue
("Foo"));
3244
Assert.Equal("Bar", project.
GetPropertyValue
("Foo"));
4248
string actual = project.
GetPropertyValue
(Constants.VisualStudioVersionPropertyName);
4553
string propertyValue = project.
GetPropertyValue
(Constants.MSBuildAllProjectsPropertyName);
4583
project.
GetPropertyValue
(Constants.MSBuildAllProjectsPropertyName).ShouldStartWith(primaryProject.ProjectFile);
Evaluation\ItemEvaluation_Tests.cs (1)
598
Assert.Equal("true", project.
GetPropertyValue
("FromImport"));
Evaluation\ProjectSdkImplicitImport_Tests.cs (1)
479
project.
GetPropertyValue
("Success").ShouldBe("true");
Evaluation\SdkResultEvaluation_Tests.cs (14)
79
project.
GetPropertyValue
("PropertyFromSdkResolver").ShouldBe("ValueFromSdkResolver");
208
project.
GetPropertyValue
("ValueFromResolverBefore").ShouldBe("Value=");
211
project.
GetPropertyValue
("ValueFromResolverAfter").ShouldBe("Value=ValueFromSdkResolver");
215
project.
GetPropertyValue
("ValueFromResolverAfter").ShouldBe("Value=");
218
project.
GetPropertyValue
("PropertyFromImportedSdk").ShouldBe("ValueFromImportedSdk");
307
project.
GetPropertyValue
("ValueFromResolverBefore").ShouldBe("Value=");
310
project.
GetPropertyValue
("ValueFromResolverAfter").ShouldBe("Value=ValueFromSdkResolver");
314
project.
GetPropertyValue
("ValueFromResolverAfter").ShouldBe("Value=");
317
project.
GetPropertyValue
("PropertyFromImportedSdk1").ShouldBe("ValueFromImportedSdk1");
318
project.
GetPropertyValue
("PropertyFromImportedSdk2").ShouldBe("ValueFromImportedSdk2");
398
project.
GetPropertyValue
("ValueFromResolverInProjectBody").ShouldBe("Value=ValueFromSdkResolver");
399
project.
GetPropertyValue
("PropertyFromSdkProps").ShouldBe("PropertyFromSdkPropsValue");
400
project.
GetPropertyValue
("PropertyFromSdkTargets").ShouldBe("PropertyFromSdkTargetsValue");
452
project.
GetPropertyValue
("PropertyName").ShouldBe("PropertyValue" + specialString);
Microsoft.Build.Tasks.UnitTests (48)
DirectoryBuildProjectImportTestBase.cs (17)
85
Assert.Equal("true", project.
GetPropertyValue
(ImportDirectoryBuildProjectPropertyName), StringComparer.OrdinalIgnoreCase);
86
Assert.Equal(String.Empty, project.
GetPropertyValue
(DirectoryBuildProjectBasePathPropertyName), StringComparer.OrdinalIgnoreCase);
87
Assert.Equal(DirectoryBuildProjectFile, project.
GetPropertyValue
(DirectoryBuildProjectFilePropertyName), StringComparer.OrdinalIgnoreCase);
88
Assert.Equal(String.Empty, project.
GetPropertyValue
(DirectoryBuildProjectPathPropertyName));
118
Assert.Equal("false", project.
GetPropertyValue
(ImportDirectoryBuildProjectPropertyName), StringComparer.OrdinalIgnoreCase);
119
Assert.Equal(String.Empty, project.
GetPropertyValue
("WasDirectoryBuildProjectImported"), StringComparer.OrdinalIgnoreCase);
120
Assert.Equal(String.Empty, project.
GetPropertyValue
(DirectoryBuildProjectBasePathPropertyName), StringComparer.OrdinalIgnoreCase);
121
Assert.Equal(String.Empty, project.
GetPropertyValue
(DirectoryBuildProjectFilePropertyName), StringComparer.OrdinalIgnoreCase);
122
Assert.Equal(String.Empty, project.
GetPropertyValue
(DirectoryBuildProjectPathPropertyName));
148
Assert.Equal("true", project.
GetPropertyValue
(ImportDirectoryBuildProjectPropertyName), StringComparer.OrdinalIgnoreCase);
149
Assert.Equal("true", project.
GetPropertyValue
("WasDirectoryBuildProjectImported"), StringComparer.OrdinalIgnoreCase);
150
Assert.Equal(customFilePath, project.
GetPropertyValue
(DirectoryBuildProjectPathPropertyName));
173
Assert.Equal("true", project.
GetPropertyValue
(ImportDirectoryBuildProjectPropertyName), StringComparer.OrdinalIgnoreCase);
174
Assert.Equal("true", project.
GetPropertyValue
("WasDirectoryBuildProjectImported"), StringComparer.OrdinalIgnoreCase);
175
Assert.Equal(ObjectModelHelpers.TempProjectDir, project.
GetPropertyValue
(DirectoryBuildProjectBasePathPropertyName), StringComparer.OrdinalIgnoreCase);
176
Assert.Equal(DirectoryBuildProjectFile, project.
GetPropertyValue
(DirectoryBuildProjectFilePropertyName), StringComparer.OrdinalIgnoreCase);
177
Assert.Equal(Path.Combine(ObjectModelHelpers.TempProjectDir, DirectoryBuildProjectFile), project.
GetPropertyValue
(DirectoryBuildProjectPathPropertyName));
NuGetPropsImportTests.cs (2)
56
Assert.Equal("true", project.
GetPropertyValue
("NuGetPropsIsImported"), StringComparer.OrdinalIgnoreCase);
82
Assert.Empty(project.
GetPropertyValue
("NuGetPropsIsImported"));
OutputPathTests.cs (13)
67
project.
GetPropertyValue
("BaseOutputPath").ShouldBe(baseOutputPath + '\\');
68
project.
GetPropertyValue
("BaseOutputPathWasSpecified").ShouldBe(string.Empty);
69
project.
GetPropertyValue
("_OutputPathWasMissing").ShouldBe("true");
103
project.
GetPropertyValue
("BaseOutputPath").ShouldBe(baseOutputPath.WithTrailingSlash());
104
project.
GetPropertyValue
("BaseOutputPathWasSpecified").ShouldBe("true");
105
project.
GetPropertyValue
("_OutputPathWasMissing").ShouldBe("true");
146
project.
GetPropertyValue
("BaseOutputPath").ShouldBe(baseOutputPath.WithTrailingSlash());
147
project.
GetPropertyValue
("OutputPath").ShouldBe(outputPath.WithTrailingSlash());
148
project.
GetPropertyValue
("BaseOutputPathWasSpecified").ShouldBe("true");
149
project.
GetPropertyValue
("_OutputPathWasMissing").ShouldBe(string.Empty);
182
project.
GetPropertyValue
("Configuration").ShouldBe(configuration);
183
project.
GetPropertyValue
("BaseOutputPath").ShouldBe(baseOutputPath.WithTrailingSlash());
186
project.
GetPropertyValue
("OutputPath").ShouldBe(expectedOutputPath);
ProjectExtensionsImportTestBase.cs (16)
64
string projectExtensionsPath = project.
GetPropertyValue
("MSBuildProjectExtensionsPath");
68
project.
GetPropertyValue
(PropertyNameToEnableImport).ShouldBe("true");
69
project.
GetPropertyValue
(PropertyNameToSignalImportSucceeded).ShouldBeEmpty();
89
string projectExtensionsPath = project.
GetPropertyValue
("MSBuildProjectExtensionsPath");
93
project.
GetPropertyValue
(PropertyNameToEnableImport).ShouldBe(bool.FalseString, StringCompareShould.IgnoreCase);
94
project.
GetPropertyValue
(PropertyNameToSignalImportSucceeded).ShouldBeEmpty();
115
string projectExtensionsPath = project.
GetPropertyValue
("MSBuildProjectExtensionsPath");
119
project.
GetPropertyValue
(PropertyNameToEnableImport).ShouldBe(bool.TrueString, StringCompareShould.IgnoreCase);
120
project.
GetPropertyValue
(PropertyNameToSignalImportSucceeded).ShouldBe(bool.TrueString, StringCompareShould.IgnoreCase);
152
project.
GetPropertyValue
(PropertyNameToEnableImport).ShouldBe("false");
153
project.
GetPropertyValue
(PropertyNameToSignalImportSucceeded).ShouldBeEmpty();
155
project.
GetPropertyValue
("MSBuildProjectExtensionsPath").ShouldBe($@"{projectExtensionsDirectory}{Path.DirectorySeparatorChar}");
181
project.
GetPropertyValue
(PropertyNameToEnableImport).ShouldBe("true");
182
project.
GetPropertyValue
(PropertyNameToSignalImportSucceeded).ShouldBe("true");
205
project.
GetPropertyValue
(PropertyNameToEnableImport).ShouldBe("true");
206
project.
GetPropertyValue
(PropertyNameToSignalImportSucceeded).ShouldBe("true");
Microsoft.Build.Utilities.UnitTests (8)
ToolLocationHelper_Tests.cs (8)
3586
string propertyValue1 = project.
GetPropertyValue
("SDKLocation1");
3587
string propertyValue2 = project.
GetPropertyValue
("SDKLocation2");
3588
string propertyValue3 = project.
GetPropertyValue
("SDKLocation3");
3589
string sdkName = project.
GetPropertyValue
("SDKName");
3658
string propertyValue1 = project.
GetPropertyValue
("SDKLocation1");
3659
string propertyValue2 = project.
GetPropertyValue
("SDKLocation2");
3660
string propertyValue3 = project.
GetPropertyValue
("SDKLocation3");
3661
string sdkName = project.
GetPropertyValue
("SDKName");
MSBuild (2)
XMake.cs (2)
1080
outputStream.WriteLine(project.
GetPropertyValue
(getProperty[0]));
1085
jsonOutputFormatter.AddPropertiesInJsonFormat(getProperty, property => project.
GetPropertyValue
(property));
TaskUsageLogger (1)
TaskUsageLogger.cs (1)
316
string propertyValue = containingProject.
GetPropertyValue
(propertyName);