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