4 implementations of GetProperty
NuGet.Build.Tasks (1)
Common\MSBuildTaskItem.cs (1)
48public string GetProperty(string property)
NuGet.Build.Tasks.Console (1)
MSBuildItemBase.cs (1)
25public string GetProperty(string property)
NuGet.Build.Tasks.Pack (1)
Common\MSBuildTaskItem.cs (1)
48public string GetProperty(string property)
NuGet.Commands (1)
RestoreCommand\RequestFactory\MSBuildItem.cs (1)
48public string GetProperty(string property)
161 references to GetProperty
NuGet.Build.Tasks.Console (67)
ExtensionMethods.cs (3)
26return IsValueFalse(item.GetProperty(name), defaultValue); 38return IsValueTrue(item.GetProperty(name), defaultValue); 49string value = item.GetProperty(name);
MSBuildItemBase.cs (1)
24/// <inheritdoc cref="IMSBuildItem.GetProperty(string)" />
MSBuildStaticGraphRestore.cs (63)
275var privateAssets = MSBuildStringUtility.Split(frameworkReferenceItem.GetProperty("PrivateAssets")); 296string versionRanges = projectItemInstance.GetProperty("Version"); 330string version = projectItemInstance.GetProperty("Version"); 356string version = packageReferenceItem.GetProperty("Version"); 365string versionOverrideString = packageReferenceItem.GetProperty("VersionOverride"); 376ImmutableArray<NuGetLogCode> noWarn = MSBuildStringUtility.GetNuGetLogCodes(packageReferenceItem.GetProperty("NoWarn")); 382Aliases = packageReferenceItem.GetProperty("Aliases"), 383IncludeType = GetLibraryIncludeFlags(packageReferenceItem.GetProperty("IncludeAssets"), LibraryIncludeFlags.All) & ~GetLibraryIncludeFlags(packageReferenceItem.GetProperty("ExcludeAssets"), LibraryIncludeFlags.None), 388SuppressParent = GetLibraryIncludeFlags(packageReferenceItem.GetProperty("PrivateAssets"), LibraryIncludeFlagUtils.DefaultSuppressParent), 406string versionString = projectItemInstance.GetProperty("Version"); 423() => UriUtility.GetAbsolutePath(project.Directory, project.GetProperty("RestorePackagesPath")), 434string packageId = project.GetProperty("PackageId"); 442string assemblyName = project.GetProperty("AssemblyName"); 451return project.GetProperty("MSBuildProjectName"); 471string fullPath = projectReferenceItem.GetProperty("FullPath"); 475ExcludeAssets = GetLibraryIncludeFlags(projectReferenceItem.GetProperty("ExcludeAssets"), LibraryIncludeFlags.None), 476IncludeAssets = GetLibraryIncludeFlags(projectReferenceItem.GetProperty("IncludeAssets"), LibraryIncludeFlags.All), 477PrivateAssets = GetLibraryIncludeFlags(projectReferenceItem.GetProperty("PrivateAssets"), LibraryIncludeFlagUtils.DefaultSuppressParent), 545var targetFrameworks = project.GetProperty("TargetFrameworks"); 554var targetFramework = project.GetProperty("TargetFramework")?.Trim(); 570string version = project.GetProperty("PackageVersion") ?? project.GetProperty("Version"); 587string version = project.GetProperty("NETCoreSdkVersion"); 607() => UriUtility.GetAbsolutePath(project.Directory, project.GetProperty("RestoreRepositoryPath")), 611string solutionDir = project.GetProperty("SolutionPath"); 628string outputPath = project.GetProperty("RestoreOutputPath") ?? project.GetProperty("MSBuildProjectExtensionsPath"); 654innerNodes.SelectMany(i => MSBuildStringUtility.Split(i.GetProperty("RestoreAdditionalProjectSources"))), 668return project.GetProperty("TargetFramework") == null && project.GetProperty("TargetFrameworks") == null; 755targetFrameworkMoniker: msBuildProjectInstance.GetProperty("TargetFrameworkMoniker"), 756targetPlatformMoniker: msBuildProjectInstance.GetProperty("TargetPlatformMoniker"), 757targetPlatformMinVersion: msBuildProjectInstance.GetProperty("TargetPlatformMinVersion"), 758clrSupport: msBuildProjectInstance.GetProperty("CLRSupport"), 759windowsTargetPlatformMinVersion: msBuildProjectInstance.GetProperty("WindowsTargetPlatformMinVersion")); 761var packageTargetFallback = MSBuildStringUtility.Split(msBuildProjectInstance.GetProperty("PackageTargetFallback")).Select(NuGetFramework.Parse).ToList(); 763var assetTargetFallbackEnum = MSBuildStringUtility.Split(msBuildProjectInstance.GetProperty(nameof(TargetFrameworkInformation.AssetTargetFallback))).Select(NuGetFramework.Parse).ToList(); 777bool? restoreEnablePackagePruning = MSBuildStringUtility.GetBooleanOrNull(msBuildProjectInstance.GetProperty("RestoreEnablePackagePruning")); 791RuntimeIdentifierGraphPath = msBuildProjectInstance.GetProperty(nameof(TargetFrameworkInformation.RuntimeIdentifierGraphPath)), 871project.OuterProject.GetProperty("MSBuildProjectName"), 1056project.GetProperty("RestoreSolutionDirectory"), 1057project.GetProperty("RestoreRootConfigDirectory") ?? project.Directory, 1058UriUtility.GetAbsolutePath(project.Directory, project.GetProperty("RestoreConfigFile")), 1078MSBuildStringUtility.Split($"{project.GetProperty("RuntimeIdentifiers")};{project.GetProperty("RuntimeIdentifier")}") 1079.Concat(projectsByTargetFramework.Values.SelectMany(i => MSBuildStringUtility.Split($"{i.GetProperty("RuntimeIdentifiers")};{i.GetProperty("RuntimeIdentifier")}"))) 1083MSBuildStringUtility.Split(project.GetProperty("RuntimeSupports")) 1139projectsByTargetFramework.Count > 1 || !string.IsNullOrWhiteSpace(project.GetProperty("TargetFrameworks"))), 1141project.GetProperty("MSBuildStartupDirectory"), 1145innerNodes.SelectMany(i => MSBuildStringUtility.Split(i.GetProperty("RestoreAdditionalProjectFallbackFolders"))), 1146innerNodes.SelectMany(i => MSBuildStringUtility.Split(i.GetProperty("RestoreAdditionalProjectFallbackFoldersExcludes"))), 1171restoreMetadata.ProjectWideWarningProperties = WarningProperties.GetWarningProperties(project.GetProperty("TreatWarningsAsErrors"), project.GetProperty("WarningsAsErrors"), project.GetProperty("NoWarn"), project.GetProperty("WarningsNotAsErrors")); 1172restoreMetadata.RestoreLockProperties = new RestoreLockProperties(project.GetProperty("RestorePackagesWithLockFile"), project.GetProperty("NuGetLockFilePath"), project.IsPropertyTrue("RestoreLockedMode")); 1175restoreMetadata.UsingMicrosoftNETSdk = MSBuildRestoreUtility.GetUsingMicrosoftNETSdk(project.GetProperty("UsingMicrosoftNETSdk")); 1176restoreMetadata.SdkAnalysisLevel = MSBuildRestoreUtility.GetSdkAnalysisLevel(project.GetProperty("SdkAnalysisLevel")); 1184ProjectStyle? projectStyleOrNull = BuildTasksUtility.GetProjectRestoreStyleFromProjectProperty(project.GetProperty("RestoreProjectStyle")); 1190projectName: project.GetProperty("MSBuildProjectName"),
NuGet.Build.Tasks.Pack (23)
PackTaskLogic.cs (23)
229msbuildItem => msbuildItem.GetProperty("ProjectVersion"), PathUtility.GetStringComparerBasedOnOS()); 417var targetFramework = tfmRef.GetProperty("TargetFramework"); 521var finalOutputPath = assembly.GetProperty("FinalOutputPath"); 527finalOutputPath = assembly.GetProperty(IdentityProperty); 530var targetPath = assembly.GetProperty("TargetPath"); 531var targetFrameworkProperty = assembly.GetProperty("TargetFramework"); 626request.PackItem.GetProperty("RootDir"), 627request.PackItem.GetProperty("Directory")).TrimEnd(Path.DirectorySeparatorChar); 633: string.Concat(request.PackItem.GetProperty("FileName"), request.PackItem.GetProperty("Extension")) 638: request.PackItem.GetProperty("FullPath"); 708var packagePathString = packageFile.GetProperty("PackagePath"); 715var recursiveDir = packageFile.GetProperty("RecursiveDir"); 717recursiveDir = string.IsNullOrEmpty(recursiveDir) ? packageFile.GetProperty("NuGetRecursiveDir") : recursiveDir; 736var buildActionString = packageFile.GetProperty("BuildAction"); 770.Equals(packageFile.GetProperty(IdentityProperty), StringComparison.CurrentCultureIgnoreCase)) 773var identity = packageFile.GetProperty(IdentityProperty); 822CopyToOutput = packageFile.GetProperty("PackageCopyToOutput"), 823Flatten = packageFile.GetProperty("PackageFlatten") 829var sourcePath = packageFile.GetProperty("FullPath"); 832var sourceProjectFile = packageFile.GetProperty("MSBuildSourceProjectFile"); 833var identity = packageFile.GetProperty(IdentityProperty); 864sourceProjectFile = src.GetProperty("MSBuildSourceProjectFile");
NuGet.Commands (71)
RestoreCommand\Utility\MSBuildRestoreUtility.cs (71)
81var projectUniqueName = item.GetProperty("ProjectUniqueName"); 216result.RestoreMetadata.ProjectPath = specItem.GetProperty("ProjectPath"); 217result.RestoreMetadata.ProjectUniqueName = specItem.GetProperty("ProjectUniqueName"); 238foreach (var source in MSBuildStringUtility.Split(specItem.GetProperty("Sources"))) 245foreach (var configFilePath in MSBuildStringUtility.Split(specItem.GetProperty("ConfigFilePaths"))) 250foreach (var folder in MSBuildStringUtility.Split(specItem.GetProperty("FallbackFolders"))) 255result.RestoreMetadata.PackagesPath = specItem.GetProperty("PackagesPath"); 256result.RestoreMetadata.OutputPath = specItem.GetProperty("OutputPath"); 309pcRestoreMetadata.PackagesConfigPath = specItem.GetProperty("PackagesConfigPath"); 310pcRestoreMetadata.RepositoryPath = specItem.GetProperty("RepositoryPath"); 311var solutionDir = specItem.GetProperty("SolutionDir"); 327result.RestoreMetadata.UsingMicrosoftNETSdk = GetUsingMicrosoftNETSdk(specItem.GetProperty("UsingMicrosoftNETSdk")); 328result.RestoreMetadata.SdkAnalysisLevel = GetSdkAnalysisLevel(specItem.GetProperty("SdkAnalysisLevel")); 331result.RestoreSettings.SdkVersion = GetSdkAnalysisLevel(specItem.GetProperty("NETCoreSdkVersion")); 349var projectPath = specItem.GetProperty("ProjectPath"); 350var projectName = specItem.GetProperty("ProjectName") ?? Path.GetFileNameWithoutExtension(projectPath); 351var outputPath = specItem.GetProperty("OutputPath"); 523var frameworkString = item.GetProperty("TargetFramework"); 524var targetFrameworkMoniker = item.GetProperty("TargetFrameworkMoniker"); 525var targetPlatforMoniker = item.GetProperty("TargetPlatformMoniker"); 526var targetPlatformMinVersion = item.GetProperty("TargetPlatformMinVersion"); 527var clrSupport = item.GetProperty("CLRSupport"); 528var windowsTargetPlatformMinVersion = item.GetProperty("WindowsTargetPlatformMinVersion"); 551var packageTargetFallback = MSBuildStringUtility.Split(item.GetProperty("PackageTargetFallback")) 555var assetTargetFallbackList = MSBuildStringUtility.Split(item.GetProperty(AssetTargetFallbackUtility.AssetTargetFallback)) 565runtimeIdentifierGraphPath = item.GetProperty("RuntimeIdentifierGraphPath"); 608var runtimes = MSBuildStringUtility.Split(specItem.GetProperty("RuntimeIdentifiers")) 613var supports = MSBuildStringUtility.Split(specItem.GetProperty("RuntimeSupports")) 677ProjectPath = item.GetProperty("ProjectPath"), 678ProjectUniqueName = item.GetProperty("ProjectReferenceUniqueName"), 681ApplyIncludeFlags(reference, item.GetProperty("IncludeAssets"), item.GetProperty("ExcludeAssets"), item.GetProperty("PrivateAssets")); 735var noWarn = MSBuildStringUtility.GetNuGetLogCodes(item.GetProperty("NoWarn")); 738string name = item.GetProperty("Id"); 775Aliases = item.GetProperty("Aliases"), 810var tfm = item.GetProperty("TargetFramework") ?? string.Empty; 812bool? restoreEnablePackagePruning = MSBuildStringUtility.GetBooleanOrNull(item.GetProperty("RestoreEnablePackagePruning")); 820var id = item.GetProperty("Id"); 821var versionString = item.GetProperty("VersionRange"); 866var id = item.GetProperty("Id"); 867var versionString = item.GetProperty("VersionRange"); 897return GetLibraryDependencyIncludeFlags(item.GetProperty("IncludeAssets"), item.GetProperty("ExcludeAssets"), item.GetProperty("PrivateAssets")); 918var frameworkReference = item.GetProperty("Id"); 920var privateAssets = item.GetProperty("PrivateAssets"); 949var rangeString = item.GetProperty(propertyName); 969spec.FilePath = specItem.GetProperty("ProjectPath"); 970spec.RestoreMetadata.ProjectName = specItem.GetProperty("ProjectName"); 974var tfmProperty = specItem.GetProperty("TargetFrameworks"); 1002var frameworksString = item.GetProperty("TargetFrameworks"); 1025return StringComparer.OrdinalIgnoreCase.Equals(type, item?.GetProperty("Type")); 1033var versionString = item.GetProperty("Version"); 1058var val = item.GetProperty(key); 1071treatWarningsAsErrors: specItem.GetProperty("TreatWarningsAsErrors"), 1072warningsAsErrors: specItem.GetProperty("WarningsAsErrors"), 1073noWarn: specItem.GetProperty("NoWarn"), 1074warningsNotAsErrors: specItem.GetProperty("WarningsNotAsErrors")); 1080specItem.GetProperty("RestorePackagesWithLockFile"), 1081specItem.GetProperty("NuGetLockFilePath"), 1087string enableAudit = specItem.GetProperty("NuGetAudit"); 1088string auditLevel = specItem.GetProperty("NuGetAuditLevel"); 1113string auditMode = item.GetProperty("NuGetAuditMode"); 1120string projectAuditMode = project.GetProperty("NuGetAuditMode"); 1158.Select(i => i.GetProperty("Id")); 1204string value = item.GetProperty(propertyName); 1216string value = item.GetProperty(propertyName); 1255string version = cv.GetProperty("VersionRange"); 1256CentralPackageVersion centralPackageVersion = new CentralPackageVersion(cv.GetProperty("Id"), string.IsNullOrWhiteSpace(version) ? VersionRange.All : VersionRange.Parse(version)); 1290var typeString = projectSpecItem.GetProperty("ProjectStyle");