201 references to GetPropertyValue
Microsoft.Build (2)
Construction\Solution\SolutionProjectGenerator.cs (1)
2171
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)
1770
projectFileAssert.Invoke(initialLocation, reloadLocation, project.
GetPropertyValue
("ProjectFile"));
1771
projectFileAssert.Invoke(initialLocation, reloadLocation, project.
GetPropertyValue
("ThisFile"));
Definition\DefinitionEditing_Tests.cs (7)
1486
Assert.Equal("v1", project.
GetPropertyValue
("p1"));
1511
Assert.Equal("v^1", project.
GetPropertyValue
("p1"));
1532
Assert.Equal("foo", project.
GetPropertyValue
("OutDir"));
1546
Assert.Equal("v0", project.
GetPropertyValue
("p1"));
1562
Assert.Equal("x@(i)x%(m)x", project.
GetPropertyValue
("p1"));
1790
Assert.Equal("v2", project.
GetPropertyValue
("p"));
1809
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)
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)
859
string solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
1112
string solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
1132
solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
1182
string solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
1227
string solutionConfigurationContents = msbuildProject.
GetPropertyValue
("CurrentSolutionConfigurationContents");
Definition\Project_Internal_Tests.cs (6)
188
Assert.Equal("2.0", project.
GetPropertyValue
("msbuildtoolsversion"));
191
Assert.Equal("2.0", project.
GetPropertyValue
("msbuildtoolsversion"));
197
project.
GetPropertyValue
("msbuildtoolsversion"));
287
project.
GetPropertyValue
(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase);
315
project.
GetPropertyValue
(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase);
345
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)
1090
Assert.Equal("dt", project.
GetPropertyValue
("msbuildprojectdefaulttargets"));
1094
Assert.Equal("dt", project.
GetPropertyValue
("msbuildprojectdefaulttargets"));
1099
Assert.Equal("dt", project.
GetPropertyValue
("msbuildprojectdefaulttargets"));
1104
Assert.Equal("dt2", project.
GetPropertyValue
("msbuildprojectdefaulttargets"));
2444
Assert.Equal(project.
GetPropertyValue
(specialPropertyName32), project.
GetPropertyValue
(specialPropertyName));
2478
Assert.Equal(@"c:\foo\bar", project.
GetPropertyValue
("MSBuildExtensionsPath"));
2501
Assert.Equal(@"c:\devdiv\vscore\msbuild", project.
GetPropertyValue
("MSBuildExtensionsPath"));
2553
string msbuildExtensionsPath32Value = project.
GetPropertyValue
("MSBuildExtensionsPath32");
2574
string msbuildExtensionsPath32Value = project.
GetPropertyValue
("MSBuildExtensionsPath32");
2628
string msbuildExtensionsPath64Value = project.
GetPropertyValue
("MSBuildExtensionsPath64");
2649
string msbuildExtensionsPath64Value = project.
GetPropertyValue
("MSBuildExtensionsPath64");
2668
Assert.Equal(expected, project.
GetPropertyValue
("LocalAppData"));
2685
string localAppDataValue = project.
GetPropertyValue
("LocalAppData");
2706
string localAppDataValue = project.
GetPropertyValue
("LocalAppData");
2717
Version.TryParse(project.
GetPropertyValue
("MSBuildAssemblyVersion"), out Version assemblyVersionAsVersion).ShouldBeTrue();
2734
string msbuildVersionProperty = project.
GetPropertyValue
("MSBuildVersion");
2735
string msbuildFileVersionProperty = project.
GetPropertyValue
("MSBuildFileVersion");
2736
string msbuildSemanticVersionProperty = project.
GetPropertyValue
("MSBuildSemanticVersion");
2769
Assert.Equal(@"c:\foo", project.
GetPropertyValue
("MSBuildProjectDirectory"));
2770
Assert.Equal(@"foo", project.
GetPropertyValue
("MSBuildProjectDirectoryNoRoot"));
2771
Assert.Equal("bar.csproj", project.
GetPropertyValue
("MSBuildProjectFile"));
2772
Assert.Equal(".csproj", project.
GetPropertyValue
("MSBuildProjectExtension"));
2773
Assert.Equal(@"c:\foo\bar.csproj", project.
GetPropertyValue
("MSBuildProjectFullPath"));
2774
Assert.Equal("bar", project.
GetPropertyValue
("MSBuildProjectName"));
2788
Assert.Equal(dir, project.
GetPropertyValue
("MSBuildProjectDirectory"));
2789
Assert.Equal(string.Empty, project.
GetPropertyValue
("MSBuildProjectDirectoryNoRoot"));
2790
Assert.Equal("bar.csproj", project.
GetPropertyValue
("MSBuildProjectFile"));
2791
Assert.Equal(".csproj", project.
GetPropertyValue
("MSBuildProjectExtension"));
2792
Assert.Equal(file, project.
GetPropertyValue
("MSBuildProjectFullPath"));
2793
Assert.Equal("bar", project.
GetPropertyValue
("MSBuildProjectName"));
2806
Assert.Equal(@"\\foo\bar", project.
GetPropertyValue
("MSBuildProjectDirectory"));
2807
Assert.Equal(string.Empty, project.
GetPropertyValue
("MSBuildProjectDirectoryNoRoot"));
2808
Assert.Equal("baz.csproj", project.
GetPropertyValue
("MSBuildProjectFile"));
2809
Assert.Equal(".csproj", project.
GetPropertyValue
("MSBuildProjectExtension"));
2810
Assert.Equal(@"\\foo\bar\baz.csproj", project.
GetPropertyValue
("MSBuildProjectFullPath"));
2811
Assert.Equal("baz", project.
GetPropertyValue
("MSBuildProjectName"));
2824
Assert.Equal(@"\\foo\bar\baz", project.
GetPropertyValue
("MSBuildProjectDirectory"));
2825
Assert.Equal(@"baz", project.
GetPropertyValue
("MSBuildProjectDirectoryNoRoot"));
2826
Assert.Equal("biz.csproj", project.
GetPropertyValue
("MSBuildProjectFile"));
2827
Assert.Equal(".csproj", project.
GetPropertyValue
("MSBuildProjectExtension"));
2828
Assert.Equal(@"\\foo\bar\baz\biz.csproj", project.
GetPropertyValue
("MSBuildProjectFullPath"));
2829
Assert.Equal("biz", project.
GetPropertyValue
("MSBuildProjectName"));
3242
Assert.Equal("BazBar", project.
GetPropertyValue
("Foo"));
3274
Assert.Equal("BazGoo", project.
GetPropertyValue
("Foo"));
3276
Assert.Equal("FooGoo", project.
GetPropertyValue
("Goo"));
3282
Assert.Equal("BazGoo", project.
GetPropertyValue
("Foo"));
3284
Assert.Equal("Foo", project.
GetPropertyValue
("Goo"));
3309
Assert.Equal("Bar", project.
GetPropertyValue
("Foo"));
3315
Assert.Equal("BazBar", project.
GetPropertyValue
("Foo"));
3321
Assert.Equal("Bar", project.
GetPropertyValue
("Foo"));
4336
string actual = project.
GetPropertyValue
(Constants.VisualStudioVersionPropertyName);
4640
string propertyValue = project.
GetPropertyValue
(Constants.MSBuildAllProjectsPropertyName);
4670
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)
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");
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
Build\ProjectBuildManager.cs (1)
162
return project?.
GetPropertyValue
(PropertyNames.TargetPath);
MSBuild\ProjectFile\ProjectFile.cs (2)
58
var targetFrameworkValue = _loadedProject.
GetPropertyValue
(PropertyNames.TargetFramework);
59
var targetFrameworksValue = _loadedProject.
GetPropertyValue
(PropertyNames.TargetFrameworks);
MSBuild (2)
XMake.cs (2)
1091
outputStream.WriteLine(project.
GetPropertyValue
(getProperty[0]));
1096
jsonOutputFormatter.AddPropertiesInJsonFormat(getProperty, property => project.
GetPropertyValue
(property));
TaskUsageLogger (1)
TaskUsageLogger.cs (1)
316
string propertyValue = containingProject.
GetPropertyValue
(propertyName);