201 references to GetPropertyValue
Microsoft.Build (2)
Construction\Solution\SolutionProjectGenerator.cs (1)
2184
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)
280
Assert.Equal("v1", project.
GetPropertyValue
("p"));
284
Assert.Equal(String.Empty, project.
GetPropertyValue
("p"));
Construction\ProjectImportElement_Tests.cs (4)
183
Assert.Equal("v1", project.
GetPropertyValue
("p"));
187
Assert.Equal("v2", project.
GetPropertyValue
("p"));
222
Assert.Equal("v1", project.
GetPropertyValue
("p"));
226
Assert.Equal(String.Empty, project.
GetPropertyValue
("p"));
Construction\ProjectRootElement_Tests.cs (2)
1766
projectFileAssert.Invoke(initialLocation, reloadLocation, project.
GetPropertyValue
("ProjectFile"));
1767
projectFileAssert.Invoke(initialLocation, reloadLocation, project.
GetPropertyValue
("ThisFile"));
Definition\DefinitionEditing_Tests.cs (7)
1484
Assert.Equal("v1", project.
GetPropertyValue
("p1"));
1509
Assert.Equal("v^1", project.
GetPropertyValue
("p1"));
1530
Assert.Equal("foo", project.
GetPropertyValue
("OutDir"));
1544
Assert.Equal("v0", project.
GetPropertyValue
("p1"));
1560
Assert.Equal("x@(i)x%(m)x", project.
GetPropertyValue
("p1"));
1788
Assert.Equal("v2", project.
GetPropertyValue
("p"));
1807
Assert.Equal("v2", project.
GetPropertyValue
("p"));
Definition\Project_Tests.cs (32)
376
project.
GetPropertyValue
("q").ShouldBe("1");
601
project.
GetPropertyValue
("p2").ShouldBe("v3");
862
project.
GetPropertyValue
("p").ShouldBe(string.Empty);
867
project.
GetPropertyValue
("p").ShouldBe("v0");
882
project.
GetPropertyValue
("p").ShouldBe("v2");
895
project.
GetPropertyValue
("p").ShouldBe("v1");
902
project.
GetPropertyValue
("p1").ShouldBe(string.Empty);
907
project.
GetPropertyValue
("p1").ShouldBe("v0");
934
project.
GetPropertyValue
("computername").ShouldBe("v1");
939
project.
GetPropertyValue
("computername").ShouldBe("v1");
967
project.
GetPropertyValue
("pp").ShouldBe(string.Empty);
972
project.
GetPropertyValue
("pp").ShouldBe("vv");
996
project.
GetPropertyValue
("pp").ShouldBe(string.Empty);
1001
project.
GetPropertyValue
("pp").ShouldBe("vv");
1033
project.
GetPropertyValue
("p").ShouldBe(string.Empty);
1039
project.
GetPropertyValue
("p").ShouldBe("v0");
1180
project.
GetPropertyValue
("msbuildtoolsversion").ShouldBe(ObjectModelHelpers.MSBuildDefaultToolsVersion);
1185
project.
GetPropertyValue
("msbuildtoolsversion").ShouldBe(ObjectModelHelpers.MSBuildDefaultToolsVersion);
1190
project.
GetPropertyValue
("msbuildtoolsversion").ShouldBe(ObjectModelHelpers.MSBuildDefaultToolsVersion);
1202
project.
GetPropertyValue
("msbuildtoolsversion").ShouldBe(ObjectModelHelpers.MSBuildDefaultToolsVersion);
1241
p.
GetPropertyValue
("VisualStudioVersion").ShouldBe(t.DefaultSubToolsetVersion ?? MSBuildConstants.CurrentVisualStudioVersion);
1267
p.
GetPropertyValue
("VisualStudioVersion").ShouldBe("ABCD");
1295
p.
GetPropertyValue
("VisualStudioVersion").ShouldBe("ABCDE");
1327
p.
GetPropertyValue
("VisualStudioVersion").ShouldBe("ABCDEF");
1411
project.
GetPropertyValue
("p").ShouldBe("v");
1502
project.
GetPropertyValue
("P").ShouldBe(p);
1588
project.
GetPropertyValue
("P").ShouldBe(p);
1857
project.
GetPropertyValue
("p").ShouldBe("v1");
1893
project.
GetPropertyValue
("p").ShouldBe("v2");
1929
project.
GetPropertyValue
("p").ShouldBe("v2");
1978
project.
GetPropertyValue
("p").ShouldBe("@(i);v1");
1979
project.
GetPropertyValue
("q").ShouldBe("@(j);v1");
Definition\ProjectProperty_Tests.cs (2)
227
Assert.Equal("v0", project.
GetPropertyValue
("p1"));
246
Assert.Equal("@(i)-%(m)", project.
GetPropertyValue
("p1"));
Definition\ProtectImports_Tests.cs (1)
153
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)
904
string solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
1157
string solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
1177
solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
1227
string solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
1272
string solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
Definition\Project_Internal_Tests.cs (6)
187
Assert.Equal("2.0", project.
GetPropertyValue
("msbuildtoolsversion"));
190
Assert.Equal("2.0", project.
GetPropertyValue
("msbuildtoolsversion"));
196
project.
GetPropertyValue
("msbuildtoolsversion"));
286
project.
GetPropertyValue
(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase);
314
project.
GetPropertyValue
(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase);
344
project.
GetPropertyValue
(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase);
Definition\ProjectEvaluationContext_Tests.cs (3)
823
project.
GetPropertyValue
("p").ShouldBe("val");
830
project.
GetPropertyValue
("p").ShouldBe("val");
834
project.
GetPropertyValue
("p").ShouldBeEmpty();
Evaluation\Evaluator_Tests.cs (54)
1125
Assert.Equal("dt", project.
GetPropertyValue
("msbuildprojectdefaulttargets"));
1129
Assert.Equal("dt", project.
GetPropertyValue
("msbuildprojectdefaulttargets"));
1134
Assert.Equal("dt", project.
GetPropertyValue
("msbuildprojectdefaulttargets"));
1139
Assert.Equal("dt2", project.
GetPropertyValue
("msbuildprojectdefaulttargets"));
2479
Assert.Equal(project.
GetPropertyValue
(specialPropertyName32), project.
GetPropertyValue
(specialPropertyName));
2513
Assert.Equal(@"c:\foo\bar", project.
GetPropertyValue
("MSBuildExtensionsPath"));
2536
Assert.Equal(@"c:\devdiv\vscore\msbuild", project.
GetPropertyValue
("MSBuildExtensionsPath"));
2588
string msbuildExtensionsPath32Value = project.
GetPropertyValue
("MSBuildExtensionsPath32");
2609
string msbuildExtensionsPath32Value = project.
GetPropertyValue
("MSBuildExtensionsPath32");
2663
string msbuildExtensionsPath64Value = project.
GetPropertyValue
("MSBuildExtensionsPath64");
2684
string msbuildExtensionsPath64Value = project.
GetPropertyValue
("MSBuildExtensionsPath64");
2703
Assert.Equal(expected, project.
GetPropertyValue
("LocalAppData"));
2720
string localAppDataValue = project.
GetPropertyValue
("LocalAppData");
2741
string localAppDataValue = project.
GetPropertyValue
("LocalAppData");
2752
Version.TryParse(project.
GetPropertyValue
("MSBuildAssemblyVersion"), out Version assemblyVersionAsVersion).ShouldBeTrue();
2769
string msbuildVersionProperty = project.
GetPropertyValue
("MSBuildVersion");
2770
string msbuildFileVersionProperty = project.
GetPropertyValue
("MSBuildFileVersion");
2771
string msbuildSemanticVersionProperty = project.
GetPropertyValue
("MSBuildSemanticVersion");
2804
Assert.Equal(@"c:\foo", project.
GetPropertyValue
("MSBuildProjectDirectory"));
2805
Assert.Equal(@"foo", project.
GetPropertyValue
("MSBuildProjectDirectoryNoRoot"));
2806
Assert.Equal("bar.csproj", project.
GetPropertyValue
("MSBuildProjectFile"));
2807
Assert.Equal(".csproj", project.
GetPropertyValue
("MSBuildProjectExtension"));
2808
Assert.Equal(@"c:\foo\bar.csproj", project.
GetPropertyValue
("MSBuildProjectFullPath"));
2809
Assert.Equal("bar", project.
GetPropertyValue
("MSBuildProjectName"));
2823
Assert.Equal(dir, project.
GetPropertyValue
("MSBuildProjectDirectory"));
2824
Assert.Equal(string.Empty, project.
GetPropertyValue
("MSBuildProjectDirectoryNoRoot"));
2825
Assert.Equal("bar.csproj", project.
GetPropertyValue
("MSBuildProjectFile"));
2826
Assert.Equal(".csproj", project.
GetPropertyValue
("MSBuildProjectExtension"));
2827
Assert.Equal(file, project.
GetPropertyValue
("MSBuildProjectFullPath"));
2828
Assert.Equal("bar", project.
GetPropertyValue
("MSBuildProjectName"));
2841
Assert.Equal(@"\\foo\bar", project.
GetPropertyValue
("MSBuildProjectDirectory"));
2842
Assert.Equal(string.Empty, project.
GetPropertyValue
("MSBuildProjectDirectoryNoRoot"));
2843
Assert.Equal("baz.csproj", project.
GetPropertyValue
("MSBuildProjectFile"));
2844
Assert.Equal(".csproj", project.
GetPropertyValue
("MSBuildProjectExtension"));
2845
Assert.Equal(@"\\foo\bar\baz.csproj", project.
GetPropertyValue
("MSBuildProjectFullPath"));
2846
Assert.Equal("baz", project.
GetPropertyValue
("MSBuildProjectName"));
2859
Assert.Equal(@"\\foo\bar\baz", project.
GetPropertyValue
("MSBuildProjectDirectory"));
2860
Assert.Equal(@"baz", project.
GetPropertyValue
("MSBuildProjectDirectoryNoRoot"));
2861
Assert.Equal("biz.csproj", project.
GetPropertyValue
("MSBuildProjectFile"));
2862
Assert.Equal(".csproj", project.
GetPropertyValue
("MSBuildProjectExtension"));
2863
Assert.Equal(@"\\foo\bar\baz\biz.csproj", project.
GetPropertyValue
("MSBuildProjectFullPath"));
2864
Assert.Equal("biz", project.
GetPropertyValue
("MSBuildProjectName"));
3277
Assert.Equal("BazBar", project.
GetPropertyValue
("Foo"));
3309
Assert.Equal("BazGoo", project.
GetPropertyValue
("Foo"));
3311
Assert.Equal("FooGoo", project.
GetPropertyValue
("Goo"));
3317
Assert.Equal("BazGoo", project.
GetPropertyValue
("Foo"));
3319
Assert.Equal("Foo", project.
GetPropertyValue
("Goo"));
3344
Assert.Equal("Bar", project.
GetPropertyValue
("Foo"));
3350
Assert.Equal("BazBar", project.
GetPropertyValue
("Foo"));
3356
Assert.Equal("Bar", project.
GetPropertyValue
("Foo"));
4371
string actual = project.
GetPropertyValue
(Constants.VisualStudioVersionPropertyName);
4675
string propertyValue = project.
GetPropertyValue
(Constants.MSBuildAllProjectsPropertyName);
4705
project.
GetPropertyValue
(Constants.MSBuildAllProjectsPropertyName).ShouldStartWith(primaryProject.ProjectFile);
Evaluation\ItemEvaluation_Tests.cs (1)
600
Assert.Equal("true", project.
GetPropertyValue
("FromImport"));
Evaluation\ProjectSdkImplicitImport_Tests.cs (1)
486
project.
GetPropertyValue
("Success").ShouldBe("true");
Evaluation\SdkResultEvaluation_Tests.cs (14)
80
project.
GetPropertyValue
("PropertyFromSdkResolver").ShouldBe("ValueFromSdkResolver");
243
project.
GetPropertyValue
("ValueFromResolverBefore").ShouldBe("Value=");
246
project.
GetPropertyValue
("ValueFromResolverAfter").ShouldBe("Value=ValueFromSdkResolver");
250
project.
GetPropertyValue
("ValueFromResolverAfter").ShouldBe("Value=");
253
project.
GetPropertyValue
("PropertyFromImportedSdk").ShouldBe("ValueFromImportedSdk");
342
project.
GetPropertyValue
("ValueFromResolverBefore").ShouldBe("Value=");
345
project.
GetPropertyValue
("ValueFromResolverAfter").ShouldBe("Value=ValueFromSdkResolver");
349
project.
GetPropertyValue
("ValueFromResolverAfter").ShouldBe("Value=");
352
project.
GetPropertyValue
("PropertyFromImportedSdk1").ShouldBe("ValueFromImportedSdk1");
353
project.
GetPropertyValue
("PropertyFromImportedSdk2").ShouldBe("ValueFromImportedSdk2");
433
project.
GetPropertyValue
("ValueFromResolverInProjectBody").ShouldBe("Value=ValueFromSdkResolver");
434
project.
GetPropertyValue
("PropertyFromSdkProps").ShouldBe("PropertyFromSdkPropsValue");
435
project.
GetPropertyValue
("PropertyFromSdkTargets").ShouldBe("PropertyFromSdkTargetsValue");
487
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)
66
project.
GetPropertyValue
("BaseOutputPath").ShouldBe(baseOutputPath + '\\');
67
project.
GetPropertyValue
("BaseOutputPathWasSpecified").ShouldBe(string.Empty);
68
project.
GetPropertyValue
("_OutputPathWasMissing").ShouldBe("true");
102
project.
GetPropertyValue
("BaseOutputPath").ShouldBe(baseOutputPath.WithTrailingSlash());
103
project.
GetPropertyValue
("BaseOutputPathWasSpecified").ShouldBe("true");
104
project.
GetPropertyValue
("_OutputPathWasMissing").ShouldBe("true");
145
project.
GetPropertyValue
("BaseOutputPath").ShouldBe(baseOutputPath.WithTrailingSlash());
146
project.
GetPropertyValue
("OutputPath").ShouldBe(outputPath.WithTrailingSlash());
147
project.
GetPropertyValue
("BaseOutputPathWasSpecified").ShouldBe("true");
148
project.
GetPropertyValue
("_OutputPathWasMissing").ShouldBe(string.Empty);
181
project.
GetPropertyValue
("Configuration").ShouldBe(configuration);
182
project.
GetPropertyValue
("BaseOutputPath").ShouldBe(baseOutputPath.WithTrailingSlash());
185
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)
3585
string propertyValue1 = project.
GetPropertyValue
("SDKLocation1");
3586
string propertyValue2 = project.
GetPropertyValue
("SDKLocation2");
3587
string propertyValue3 = project.
GetPropertyValue
("SDKLocation3");
3588
string sdkName = project.
GetPropertyValue
("SDKName");
3657
string propertyValue1 = project.
GetPropertyValue
("SDKLocation1");
3658
string propertyValue2 = project.
GetPropertyValue
("SDKLocation2");
3659
string propertyValue3 = project.
GetPropertyValue
("SDKLocation3");
3660
string sdkName = project.
GetPropertyValue
("SDKName");
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
Build\ProjectBuildManager.cs (1)
162
return project?.
GetPropertyValue
(PropertyNames.TargetPath);
MSBuild\ProjectFile\ProjectFile.cs (2)
56
var targetFrameworkValue = _loadedProject.
GetPropertyValue
(PropertyNames.TargetFramework);
57
var targetFrameworksValue = _loadedProject.
GetPropertyValue
(PropertyNames.TargetFrameworks);
MSBuild (2)
XMake.cs (2)
1097
outputStream.WriteLine(project.
GetPropertyValue
(getProperty[0]));
1102
jsonOutputFormatter.AddPropertiesInJsonFormat(getProperty, property => project.
GetPropertyValue
(property));
TaskUsageLogger (1)
TaskUsageLogger.cs (1)
316
string propertyValue = containingProject.
GetPropertyValue
(propertyName);