201 references to GetPropertyValue
Microsoft.Build (2)
Construction\Solution\SolutionProjectGenerator.cs (1)
2171string 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)
280Assert.Equal("v1", project.GetPropertyValue("p")); 284Assert.Equal(String.Empty, project.GetPropertyValue("p"));
Construction\ProjectImportElement_Tests.cs (4)
183Assert.Equal("v1", project.GetPropertyValue("p")); 187Assert.Equal("v2", project.GetPropertyValue("p")); 222Assert.Equal("v1", project.GetPropertyValue("p")); 226Assert.Equal(String.Empty, project.GetPropertyValue("p"));
Construction\ProjectRootElement_Tests.cs (2)
1770projectFileAssert.Invoke(initialLocation, reloadLocation, project.GetPropertyValue("ProjectFile")); 1771projectFileAssert.Invoke(initialLocation, reloadLocation, project.GetPropertyValue("ThisFile"));
Definition\DefinitionEditing_Tests.cs (7)
1486Assert.Equal("v1", project.GetPropertyValue("p1")); 1511Assert.Equal("v^1", project.GetPropertyValue("p1")); 1532Assert.Equal("foo", project.GetPropertyValue("OutDir")); 1546Assert.Equal("v0", project.GetPropertyValue("p1")); 1562Assert.Equal("x@(i)x%(m)x", project.GetPropertyValue("p1")); 1790Assert.Equal("v2", project.GetPropertyValue("p")); 1809Assert.Equal("v2", project.GetPropertyValue("p"));
Definition\Project_Tests.cs (32)
376project.GetPropertyValue("q").ShouldBe("1"); 601project.GetPropertyValue("p2").ShouldBe("v3"); 862project.GetPropertyValue("p").ShouldBe(string.Empty); 867project.GetPropertyValue("p").ShouldBe("v0"); 882project.GetPropertyValue("p").ShouldBe("v2"); 895project.GetPropertyValue("p").ShouldBe("v1"); 902project.GetPropertyValue("p1").ShouldBe(string.Empty); 907project.GetPropertyValue("p1").ShouldBe("v0"); 934project.GetPropertyValue("computername").ShouldBe("v1"); 939project.GetPropertyValue("computername").ShouldBe("v1"); 967project.GetPropertyValue("pp").ShouldBe(string.Empty); 972project.GetPropertyValue("pp").ShouldBe("vv"); 996project.GetPropertyValue("pp").ShouldBe(string.Empty); 1001project.GetPropertyValue("pp").ShouldBe("vv"); 1033project.GetPropertyValue("p").ShouldBe(string.Empty); 1039project.GetPropertyValue("p").ShouldBe("v0"); 1180project.GetPropertyValue("msbuildtoolsversion").ShouldBe(ObjectModelHelpers.MSBuildDefaultToolsVersion); 1185project.GetPropertyValue("msbuildtoolsversion").ShouldBe(ObjectModelHelpers.MSBuildDefaultToolsVersion); 1190project.GetPropertyValue("msbuildtoolsversion").ShouldBe(ObjectModelHelpers.MSBuildDefaultToolsVersion); 1202project.GetPropertyValue("msbuildtoolsversion").ShouldBe(ObjectModelHelpers.MSBuildDefaultToolsVersion); 1241p.GetPropertyValue("VisualStudioVersion").ShouldBe(t.DefaultSubToolsetVersion ?? MSBuildConstants.CurrentVisualStudioVersion); 1267p.GetPropertyValue("VisualStudioVersion").ShouldBe("ABCD"); 1295p.GetPropertyValue("VisualStudioVersion").ShouldBe("ABCDE"); 1327p.GetPropertyValue("VisualStudioVersion").ShouldBe("ABCDEF"); 1411project.GetPropertyValue("p").ShouldBe("v"); 1502project.GetPropertyValue("P").ShouldBe(p); 1588project.GetPropertyValue("P").ShouldBe(p); 1857project.GetPropertyValue("p").ShouldBe("v1"); 1893project.GetPropertyValue("p").ShouldBe("v2"); 1929project.GetPropertyValue("p").ShouldBe("v2"); 1978project.GetPropertyValue("p").ShouldBe("@(i);v1"); 1979project.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)
859string solutionConfigurationContents = msbuildProject.GetPropertyValue("CurrentSolutionConfigurationContents"); 1112string solutionConfigurationContents = msbuildProject.GetPropertyValue("CurrentSolutionConfigurationContents"); 1132solutionConfigurationContents = msbuildProject.GetPropertyValue("CurrentSolutionConfigurationContents"); 1182string solutionConfigurationContents = msbuildProject.GetPropertyValue("CurrentSolutionConfigurationContents"); 1227string solutionConfigurationContents = msbuildProject.GetPropertyValue("CurrentSolutionConfigurationContents");
Definition\Project_Internal_Tests.cs (6)
188Assert.Equal("2.0", project.GetPropertyValue("msbuildtoolsversion")); 191Assert.Equal("2.0", project.GetPropertyValue("msbuildtoolsversion")); 197project.GetPropertyValue("msbuildtoolsversion")); 287project.GetPropertyValue(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase); 315project.GetPropertyValue(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase); 345project.GetPropertyValue(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase);
Definition\ProjectEvaluationContext_Tests.cs (3)
823project.GetPropertyValue("p").ShouldBe("val"); 830project.GetPropertyValue("p").ShouldBe("val"); 834project.GetPropertyValue("p").ShouldBeEmpty();
Evaluation\Evaluator_Tests.cs (54)
1090Assert.Equal("dt", project.GetPropertyValue("msbuildprojectdefaulttargets")); 1094Assert.Equal("dt", project.GetPropertyValue("msbuildprojectdefaulttargets")); 1099Assert.Equal("dt", project.GetPropertyValue("msbuildprojectdefaulttargets")); 1104Assert.Equal("dt2", project.GetPropertyValue("msbuildprojectdefaulttargets")); 2444Assert.Equal(project.GetPropertyValue(specialPropertyName32), project.GetPropertyValue(specialPropertyName)); 2478Assert.Equal(@"c:\foo\bar", project.GetPropertyValue("MSBuildExtensionsPath")); 2501Assert.Equal(@"c:\devdiv\vscore\msbuild", project.GetPropertyValue("MSBuildExtensionsPath")); 2553string msbuildExtensionsPath32Value = project.GetPropertyValue("MSBuildExtensionsPath32"); 2574string msbuildExtensionsPath32Value = project.GetPropertyValue("MSBuildExtensionsPath32"); 2628string msbuildExtensionsPath64Value = project.GetPropertyValue("MSBuildExtensionsPath64"); 2649string msbuildExtensionsPath64Value = project.GetPropertyValue("MSBuildExtensionsPath64"); 2668Assert.Equal(expected, project.GetPropertyValue("LocalAppData")); 2685string localAppDataValue = project.GetPropertyValue("LocalAppData"); 2706string localAppDataValue = project.GetPropertyValue("LocalAppData"); 2717Version.TryParse(project.GetPropertyValue("MSBuildAssemblyVersion"), out Version assemblyVersionAsVersion).ShouldBeTrue(); 2734string msbuildVersionProperty = project.GetPropertyValue("MSBuildVersion"); 2735string msbuildFileVersionProperty = project.GetPropertyValue("MSBuildFileVersion"); 2736string msbuildSemanticVersionProperty = project.GetPropertyValue("MSBuildSemanticVersion"); 2769Assert.Equal(@"c:\foo", project.GetPropertyValue("MSBuildProjectDirectory")); 2770Assert.Equal(@"foo", project.GetPropertyValue("MSBuildProjectDirectoryNoRoot")); 2771Assert.Equal("bar.csproj", project.GetPropertyValue("MSBuildProjectFile")); 2772Assert.Equal(".csproj", project.GetPropertyValue("MSBuildProjectExtension")); 2773Assert.Equal(@"c:\foo\bar.csproj", project.GetPropertyValue("MSBuildProjectFullPath")); 2774Assert.Equal("bar", project.GetPropertyValue("MSBuildProjectName")); 2788Assert.Equal(dir, project.GetPropertyValue("MSBuildProjectDirectory")); 2789Assert.Equal(string.Empty, project.GetPropertyValue("MSBuildProjectDirectoryNoRoot")); 2790Assert.Equal("bar.csproj", project.GetPropertyValue("MSBuildProjectFile")); 2791Assert.Equal(".csproj", project.GetPropertyValue("MSBuildProjectExtension")); 2792Assert.Equal(file, project.GetPropertyValue("MSBuildProjectFullPath")); 2793Assert.Equal("bar", project.GetPropertyValue("MSBuildProjectName")); 2806Assert.Equal(@"\\foo\bar", project.GetPropertyValue("MSBuildProjectDirectory")); 2807Assert.Equal(string.Empty, project.GetPropertyValue("MSBuildProjectDirectoryNoRoot")); 2808Assert.Equal("baz.csproj", project.GetPropertyValue("MSBuildProjectFile")); 2809Assert.Equal(".csproj", project.GetPropertyValue("MSBuildProjectExtension")); 2810Assert.Equal(@"\\foo\bar\baz.csproj", project.GetPropertyValue("MSBuildProjectFullPath")); 2811Assert.Equal("baz", project.GetPropertyValue("MSBuildProjectName")); 2824Assert.Equal(@"\\foo\bar\baz", project.GetPropertyValue("MSBuildProjectDirectory")); 2825Assert.Equal(@"baz", project.GetPropertyValue("MSBuildProjectDirectoryNoRoot")); 2826Assert.Equal("biz.csproj", project.GetPropertyValue("MSBuildProjectFile")); 2827Assert.Equal(".csproj", project.GetPropertyValue("MSBuildProjectExtension")); 2828Assert.Equal(@"\\foo\bar\baz\biz.csproj", project.GetPropertyValue("MSBuildProjectFullPath")); 2829Assert.Equal("biz", project.GetPropertyValue("MSBuildProjectName")); 3242Assert.Equal("BazBar", project.GetPropertyValue("Foo")); 3274Assert.Equal("BazGoo", project.GetPropertyValue("Foo")); 3276Assert.Equal("FooGoo", project.GetPropertyValue("Goo")); 3282Assert.Equal("BazGoo", project.GetPropertyValue("Foo")); 3284Assert.Equal("Foo", project.GetPropertyValue("Goo")); 3309Assert.Equal("Bar", project.GetPropertyValue("Foo")); 3315Assert.Equal("BazBar", project.GetPropertyValue("Foo")); 3321Assert.Equal("Bar", project.GetPropertyValue("Foo")); 4336string actual = project.GetPropertyValue(Constants.VisualStudioVersionPropertyName); 4640string propertyValue = project.GetPropertyValue(Constants.MSBuildAllProjectsPropertyName); 4670project.GetPropertyValue(Constants.MSBuildAllProjectsPropertyName).ShouldStartWith(primaryProject.ProjectFile);
Evaluation\ItemEvaluation_Tests.cs (1)
600Assert.Equal("true", project.GetPropertyValue("FromImport"));
Evaluation\ProjectSdkImplicitImport_Tests.cs (1)
486project.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");
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
Build\ProjectBuildManager.cs (1)
162return project?.GetPropertyValue(PropertyNames.TargetPath);
MSBuild\ProjectFile\ProjectFile.cs (2)
58var targetFrameworkValue = _loadedProject.GetPropertyValue(PropertyNames.TargetFramework); 59var targetFrameworksValue = _loadedProject.GetPropertyValue(PropertyNames.TargetFrameworks);
MSBuild (2)
XMake.cs (2)
1091outputStream.WriteLine(project.GetPropertyValue(getProperty[0])); 1096jsonOutputFormatter.AddPropertiesInJsonFormat(getProperty, property => project.GetPropertyValue(property));
TaskUsageLogger (1)
TaskUsageLogger.cs (1)
316string propertyValue = containingProject.GetPropertyValue(propertyName);