201 references to GetPropertyValue
Microsoft.Build (2)
Construction\Solution\SolutionProjectGenerator.cs (1)
2184string 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)
1766projectFileAssert.Invoke(initialLocation, reloadLocation, project.GetPropertyValue("ProjectFile")); 1767projectFileAssert.Invoke(initialLocation, reloadLocation, project.GetPropertyValue("ThisFile"));
Definition\DefinitionEditing_Tests.cs (7)
1484Assert.Equal("v1", project.GetPropertyValue("p1")); 1509Assert.Equal("v^1", project.GetPropertyValue("p1")); 1530Assert.Equal("foo", project.GetPropertyValue("OutDir")); 1544Assert.Equal("v0", project.GetPropertyValue("p1")); 1560Assert.Equal("x@(i)x%(m)x", project.GetPropertyValue("p1")); 1788Assert.Equal("v2", project.GetPropertyValue("p")); 1807Assert.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)
227Assert.Equal("v0", project.GetPropertyValue("p1")); 246Assert.Equal("@(i)-%(m)", project.GetPropertyValue("p1"));
Definition\ProtectImports_Tests.cs (1)
153Assert.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)
904string solutionConfigurationContents = msbuildProject.GetPropertyValue("CurrentSolutionConfigurationContents"); 1157string solutionConfigurationContents = msbuildProject.GetPropertyValue("CurrentSolutionConfigurationContents"); 1177solutionConfigurationContents = msbuildProject.GetPropertyValue("CurrentSolutionConfigurationContents"); 1227string solutionConfigurationContents = msbuildProject.GetPropertyValue("CurrentSolutionConfigurationContents"); 1272string solutionConfigurationContents = msbuildProject.GetPropertyValue("CurrentSolutionConfigurationContents");
Definition\Project_Internal_Tests.cs (6)
187Assert.Equal("2.0", project.GetPropertyValue("msbuildtoolsversion")); 190Assert.Equal("2.0", project.GetPropertyValue("msbuildtoolsversion")); 196project.GetPropertyValue("msbuildtoolsversion")); 286project.GetPropertyValue(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase); 314project.GetPropertyValue(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase); 344project.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)
1125Assert.Equal("dt", project.GetPropertyValue("msbuildprojectdefaulttargets")); 1129Assert.Equal("dt", project.GetPropertyValue("msbuildprojectdefaulttargets")); 1134Assert.Equal("dt", project.GetPropertyValue("msbuildprojectdefaulttargets")); 1139Assert.Equal("dt2", project.GetPropertyValue("msbuildprojectdefaulttargets")); 2479Assert.Equal(project.GetPropertyValue(specialPropertyName32), project.GetPropertyValue(specialPropertyName)); 2513Assert.Equal(@"c:\foo\bar", project.GetPropertyValue("MSBuildExtensionsPath")); 2536Assert.Equal(@"c:\devdiv\vscore\msbuild", project.GetPropertyValue("MSBuildExtensionsPath")); 2588string msbuildExtensionsPath32Value = project.GetPropertyValue("MSBuildExtensionsPath32"); 2609string msbuildExtensionsPath32Value = project.GetPropertyValue("MSBuildExtensionsPath32"); 2663string msbuildExtensionsPath64Value = project.GetPropertyValue("MSBuildExtensionsPath64"); 2684string msbuildExtensionsPath64Value = project.GetPropertyValue("MSBuildExtensionsPath64"); 2703Assert.Equal(expected, project.GetPropertyValue("LocalAppData")); 2720string localAppDataValue = project.GetPropertyValue("LocalAppData"); 2741string localAppDataValue = project.GetPropertyValue("LocalAppData"); 2752Version.TryParse(project.GetPropertyValue("MSBuildAssemblyVersion"), out Version assemblyVersionAsVersion).ShouldBeTrue(); 2769string msbuildVersionProperty = project.GetPropertyValue("MSBuildVersion"); 2770string msbuildFileVersionProperty = project.GetPropertyValue("MSBuildFileVersion"); 2771string msbuildSemanticVersionProperty = project.GetPropertyValue("MSBuildSemanticVersion"); 2804Assert.Equal(@"c:\foo", project.GetPropertyValue("MSBuildProjectDirectory")); 2805Assert.Equal(@"foo", project.GetPropertyValue("MSBuildProjectDirectoryNoRoot")); 2806Assert.Equal("bar.csproj", project.GetPropertyValue("MSBuildProjectFile")); 2807Assert.Equal(".csproj", project.GetPropertyValue("MSBuildProjectExtension")); 2808Assert.Equal(@"c:\foo\bar.csproj", project.GetPropertyValue("MSBuildProjectFullPath")); 2809Assert.Equal("bar", project.GetPropertyValue("MSBuildProjectName")); 2823Assert.Equal(dir, project.GetPropertyValue("MSBuildProjectDirectory")); 2824Assert.Equal(string.Empty, project.GetPropertyValue("MSBuildProjectDirectoryNoRoot")); 2825Assert.Equal("bar.csproj", project.GetPropertyValue("MSBuildProjectFile")); 2826Assert.Equal(".csproj", project.GetPropertyValue("MSBuildProjectExtension")); 2827Assert.Equal(file, project.GetPropertyValue("MSBuildProjectFullPath")); 2828Assert.Equal("bar", project.GetPropertyValue("MSBuildProjectName")); 2841Assert.Equal(@"\\foo\bar", project.GetPropertyValue("MSBuildProjectDirectory")); 2842Assert.Equal(string.Empty, project.GetPropertyValue("MSBuildProjectDirectoryNoRoot")); 2843Assert.Equal("baz.csproj", project.GetPropertyValue("MSBuildProjectFile")); 2844Assert.Equal(".csproj", project.GetPropertyValue("MSBuildProjectExtension")); 2845Assert.Equal(@"\\foo\bar\baz.csproj", project.GetPropertyValue("MSBuildProjectFullPath")); 2846Assert.Equal("baz", project.GetPropertyValue("MSBuildProjectName")); 2859Assert.Equal(@"\\foo\bar\baz", project.GetPropertyValue("MSBuildProjectDirectory")); 2860Assert.Equal(@"baz", project.GetPropertyValue("MSBuildProjectDirectoryNoRoot")); 2861Assert.Equal("biz.csproj", project.GetPropertyValue("MSBuildProjectFile")); 2862Assert.Equal(".csproj", project.GetPropertyValue("MSBuildProjectExtension")); 2863Assert.Equal(@"\\foo\bar\baz\biz.csproj", project.GetPropertyValue("MSBuildProjectFullPath")); 2864Assert.Equal("biz", project.GetPropertyValue("MSBuildProjectName")); 3277Assert.Equal("BazBar", project.GetPropertyValue("Foo")); 3309Assert.Equal("BazGoo", project.GetPropertyValue("Foo")); 3311Assert.Equal("FooGoo", project.GetPropertyValue("Goo")); 3317Assert.Equal("BazGoo", project.GetPropertyValue("Foo")); 3319Assert.Equal("Foo", project.GetPropertyValue("Goo")); 3344Assert.Equal("Bar", project.GetPropertyValue("Foo")); 3350Assert.Equal("BazBar", project.GetPropertyValue("Foo")); 3356Assert.Equal("Bar", project.GetPropertyValue("Foo")); 4371string actual = project.GetPropertyValue(Constants.VisualStudioVersionPropertyName); 4675string propertyValue = project.GetPropertyValue(Constants.MSBuildAllProjectsPropertyName); 4705project.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)
80project.GetPropertyValue("PropertyFromSdkResolver").ShouldBe("ValueFromSdkResolver"); 243project.GetPropertyValue("ValueFromResolverBefore").ShouldBe("Value="); 246project.GetPropertyValue("ValueFromResolverAfter").ShouldBe("Value=ValueFromSdkResolver"); 250project.GetPropertyValue("ValueFromResolverAfter").ShouldBe("Value="); 253project.GetPropertyValue("PropertyFromImportedSdk").ShouldBe("ValueFromImportedSdk"); 342project.GetPropertyValue("ValueFromResolverBefore").ShouldBe("Value="); 345project.GetPropertyValue("ValueFromResolverAfter").ShouldBe("Value=ValueFromSdkResolver"); 349project.GetPropertyValue("ValueFromResolverAfter").ShouldBe("Value="); 352project.GetPropertyValue("PropertyFromImportedSdk1").ShouldBe("ValueFromImportedSdk1"); 353project.GetPropertyValue("PropertyFromImportedSdk2").ShouldBe("ValueFromImportedSdk2"); 433project.GetPropertyValue("ValueFromResolverInProjectBody").ShouldBe("Value=ValueFromSdkResolver"); 434project.GetPropertyValue("PropertyFromSdkProps").ShouldBe("PropertyFromSdkPropsValue"); 435project.GetPropertyValue("PropertyFromSdkTargets").ShouldBe("PropertyFromSdkTargetsValue"); 487project.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)
66project.GetPropertyValue("BaseOutputPath").ShouldBe(baseOutputPath + '\\'); 67project.GetPropertyValue("BaseOutputPathWasSpecified").ShouldBe(string.Empty); 68project.GetPropertyValue("_OutputPathWasMissing").ShouldBe("true"); 102project.GetPropertyValue("BaseOutputPath").ShouldBe(baseOutputPath.WithTrailingSlash()); 103project.GetPropertyValue("BaseOutputPathWasSpecified").ShouldBe("true"); 104project.GetPropertyValue("_OutputPathWasMissing").ShouldBe("true"); 145project.GetPropertyValue("BaseOutputPath").ShouldBe(baseOutputPath.WithTrailingSlash()); 146project.GetPropertyValue("OutputPath").ShouldBe(outputPath.WithTrailingSlash()); 147project.GetPropertyValue("BaseOutputPathWasSpecified").ShouldBe("true"); 148project.GetPropertyValue("_OutputPathWasMissing").ShouldBe(string.Empty); 181project.GetPropertyValue("Configuration").ShouldBe(configuration); 182project.GetPropertyValue("BaseOutputPath").ShouldBe(baseOutputPath.WithTrailingSlash()); 185project.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)
3585string propertyValue1 = project.GetPropertyValue("SDKLocation1"); 3586string propertyValue2 = project.GetPropertyValue("SDKLocation2"); 3587string propertyValue3 = project.GetPropertyValue("SDKLocation3"); 3588string sdkName = project.GetPropertyValue("SDKName"); 3657string propertyValue1 = project.GetPropertyValue("SDKLocation1"); 3658string propertyValue2 = project.GetPropertyValue("SDKLocation2"); 3659string propertyValue3 = project.GetPropertyValue("SDKLocation3"); 3660string sdkName = project.GetPropertyValue("SDKName");
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
Build\ProjectBuildManager.cs (1)
162return project?.GetPropertyValue(PropertyNames.TargetPath);
MSBuild\ProjectFile\ProjectFile.cs (2)
56var targetFrameworkValue = _loadedProject.GetPropertyValue(PropertyNames.TargetFramework); 57var targetFrameworksValue = _loadedProject.GetPropertyValue(PropertyNames.TargetFrameworks);
MSBuild (2)
XMake.cs (2)
1097outputStream.WriteLine(project.GetPropertyValue(getProperty[0])); 1102jsonOutputFormatter.AddPropertiesInJsonFormat(getProperty, property => project.GetPropertyValue(property));
TaskUsageLogger (1)
TaskUsageLogger.cs (1)
316string propertyValue = containingProject.GetPropertyValue(propertyName);