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)
282var privateAssets = MSBuildStringUtility.Split(frameworkReferenceItem.GetProperty("PrivateAssets")); 303string versionRanges = projectItemInstance.GetProperty("Version"); 337string version = projectItemInstance.GetProperty("Version"); 363string version = packageReferenceItem.GetProperty("Version"); 372string versionOverrideString = packageReferenceItem.GetProperty("VersionOverride"); 383ImmutableArray<NuGetLogCode> noWarn = MSBuildStringUtility.GetNuGetLogCodes(packageReferenceItem.GetProperty("NoWarn")); 389Aliases = packageReferenceItem.GetProperty("Aliases"), 390IncludeType = GetLibraryIncludeFlags(packageReferenceItem.GetProperty("IncludeAssets"), LibraryIncludeFlags.All) & ~GetLibraryIncludeFlags(packageReferenceItem.GetProperty("ExcludeAssets"), LibraryIncludeFlags.None), 395SuppressParent = GetLibraryIncludeFlags(packageReferenceItem.GetProperty("PrivateAssets"), LibraryIncludeFlagUtils.DefaultSuppressParent), 413string versionString = projectItemInstance.GetProperty("Version"); 430() => UriUtility.GetAbsolutePath(project.Directory, project.GetProperty("RestorePackagesPath")), 441string packageId = project.GetProperty("PackageId"); 449string assemblyName = project.GetProperty("AssemblyName"); 458return project.GetProperty("MSBuildProjectName"); 478string fullPath = projectReferenceItem.GetProperty("FullPath"); 482ExcludeAssets = GetLibraryIncludeFlags(projectReferenceItem.GetProperty("ExcludeAssets"), LibraryIncludeFlags.None), 483IncludeAssets = GetLibraryIncludeFlags(projectReferenceItem.GetProperty("IncludeAssets"), LibraryIncludeFlags.All), 484PrivateAssets = GetLibraryIncludeFlags(projectReferenceItem.GetProperty("PrivateAssets"), LibraryIncludeFlagUtils.DefaultSuppressParent), 552var targetFrameworks = project.GetProperty("TargetFrameworks"); 561var targetFramework = project.GetProperty("TargetFramework")?.Trim(); 577string version = project.GetProperty("PackageVersion") ?? project.GetProperty("Version"); 594string version = project.GetProperty("NETCoreSdkVersion"); 614() => UriUtility.GetAbsolutePath(project.Directory, project.GetProperty("RestoreRepositoryPath")), 618string solutionDir = project.GetProperty("SolutionPath"); 635string outputPath = project.GetProperty("RestoreOutputPath") ?? project.GetProperty("MSBuildProjectExtensionsPath"); 661innerNodes.SelectMany(i => MSBuildStringUtility.Split(i.GetProperty("RestoreAdditionalProjectSources"))), 675return project.GetProperty("TargetFramework") == null && project.GetProperty("TargetFrameworks") == null; 762targetFrameworkMoniker: msBuildProjectInstance.GetProperty("TargetFrameworkMoniker"), 763targetPlatformMoniker: msBuildProjectInstance.GetProperty("TargetPlatformMoniker"), 764targetPlatformMinVersion: msBuildProjectInstance.GetProperty("TargetPlatformMinVersion"), 765clrSupport: msBuildProjectInstance.GetProperty("CLRSupport"), 766windowsTargetPlatformMinVersion: msBuildProjectInstance.GetProperty("WindowsTargetPlatformMinVersion")); 768var packageTargetFallback = MSBuildStringUtility.Split(msBuildProjectInstance.GetProperty("PackageTargetFallback")).Select(NuGetFramework.Parse).ToList(); 770var assetTargetFallbackEnum = MSBuildStringUtility.Split(msBuildProjectInstance.GetProperty(nameof(TargetFrameworkInformation.AssetTargetFallback))).Select(NuGetFramework.Parse).ToList(); 784bool? restoreEnablePackagePruning = MSBuildStringUtility.GetBooleanOrNull(msBuildProjectInstance.GetProperty("RestoreEnablePackagePruning")); 798RuntimeIdentifierGraphPath = msBuildProjectInstance.GetProperty(nameof(TargetFrameworkInformation.RuntimeIdentifierGraphPath)), 881project.OuterProject.GetProperty("MSBuildProjectName"), 1069project.GetProperty("RestoreSolutionDirectory"), 1070project.GetProperty("RestoreRootConfigDirectory") ?? project.Directory, 1071UriUtility.GetAbsolutePath(project.Directory, project.GetProperty("RestoreConfigFile")), 1091MSBuildStringUtility.Split($"{project.GetProperty("RuntimeIdentifiers")};{project.GetProperty("RuntimeIdentifier")}") 1092.Concat(projectsByTargetFramework.Values.SelectMany(i => MSBuildStringUtility.Split($"{i.GetProperty("RuntimeIdentifiers")};{i.GetProperty("RuntimeIdentifier")}"))) 1096MSBuildStringUtility.Split(project.GetProperty("RuntimeSupports")) 1152projectsByTargetFramework.Count > 1 || !string.IsNullOrWhiteSpace(project.GetProperty("TargetFrameworks"))), 1154project.GetProperty("MSBuildStartupDirectory"), 1158innerNodes.SelectMany(i => MSBuildStringUtility.Split(i.GetProperty("RestoreAdditionalProjectFallbackFolders"))), 1159innerNodes.SelectMany(i => MSBuildStringUtility.Split(i.GetProperty("RestoreAdditionalProjectFallbackFoldersExcludes"))), 1184restoreMetadata.ProjectWideWarningProperties = WarningProperties.GetWarningProperties(project.GetProperty("TreatWarningsAsErrors"), project.GetProperty("WarningsAsErrors"), project.GetProperty("NoWarn"), project.GetProperty("WarningsNotAsErrors")); 1185restoreMetadata.RestoreLockProperties = new RestoreLockProperties(project.GetProperty("RestorePackagesWithLockFile"), project.GetProperty("NuGetLockFilePath"), project.IsPropertyTrue("RestoreLockedMode")); 1188restoreMetadata.UsingMicrosoftNETSdk = MSBuildRestoreUtility.GetUsingMicrosoftNETSdk(project.GetProperty("UsingMicrosoftNETSdk")); 1189restoreMetadata.SdkAnalysisLevel = MSBuildRestoreUtility.GetSdkAnalysisLevel(project.GetProperty("SdkAnalysisLevel")); 1198ProjectStyle? projectStyleOrNull = BuildTasksUtility.GetProjectRestoreStyleFromProjectProperty(project.GetProperty("RestoreProjectStyle")); 1204projectName: project.GetProperty("MSBuildProjectName"),
NuGet.Build.Tasks.Pack (23)
PackTaskLogic.cs (23)
224msbuildItem => msbuildItem.GetProperty("ProjectVersion"), PathUtility.GetStringComparerBasedOnOS()); 412var targetFramework = tfmRef.GetProperty("TargetFramework"); 516var finalOutputPath = assembly.GetProperty("FinalOutputPath"); 522finalOutputPath = assembly.GetProperty(IdentityProperty); 525var targetPath = assembly.GetProperty("TargetPath"); 526var targetFrameworkProperty = assembly.GetProperty("TargetFramework"); 621request.PackItem.GetProperty("RootDir"), 622request.PackItem.GetProperty("Directory")).TrimEnd(Path.DirectorySeparatorChar); 628: string.Concat(request.PackItem.GetProperty("FileName"), request.PackItem.GetProperty("Extension")) 633: request.PackItem.GetProperty("FullPath"); 703var packagePathString = packageFile.GetProperty("PackagePath"); 710var recursiveDir = packageFile.GetProperty("RecursiveDir"); 712recursiveDir = string.IsNullOrEmpty(recursiveDir) ? packageFile.GetProperty("NuGetRecursiveDir") : recursiveDir; 731var buildActionString = packageFile.GetProperty("BuildAction"); 765.Equals(packageFile.GetProperty(IdentityProperty), StringComparison.CurrentCultureIgnoreCase)) 768var identity = packageFile.GetProperty(IdentityProperty); 817CopyToOutput = packageFile.GetProperty("PackageCopyToOutput"), 818Flatten = packageFile.GetProperty("PackageFlatten") 824var sourcePath = packageFile.GetProperty("FullPath"); 827var sourceProjectFile = packageFile.GetProperty("MSBuildSourceProjectFile"); 828var identity = packageFile.GetProperty(IdentityProperty); 859sourceProjectFile = 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")); 332result.RestoreSettings.SdkVersion = GetSdkAnalysisLevel(specItem.GetProperty("NETCoreSdkVersion")); 350var projectPath = specItem.GetProperty("ProjectPath"); 351var projectName = specItem.GetProperty("ProjectName") ?? Path.GetFileNameWithoutExtension(projectPath); 352var outputPath = specItem.GetProperty("OutputPath"); 524var frameworkString = item.GetProperty("TargetFramework"); 525var targetFrameworkMoniker = item.GetProperty("TargetFrameworkMoniker"); 526var targetPlatforMoniker = item.GetProperty("TargetPlatformMoniker"); 527var targetPlatformMinVersion = item.GetProperty("TargetPlatformMinVersion"); 528var clrSupport = item.GetProperty("CLRSupport"); 529var windowsTargetPlatformMinVersion = item.GetProperty("WindowsTargetPlatformMinVersion"); 552var packageTargetFallback = MSBuildStringUtility.Split(item.GetProperty("PackageTargetFallback")) 556var assetTargetFallbackList = MSBuildStringUtility.Split(item.GetProperty(AssetTargetFallbackUtility.AssetTargetFallback)) 566runtimeIdentifierGraphPath = item.GetProperty("RuntimeIdentifierGraphPath"); 609var runtimes = MSBuildStringUtility.Split(specItem.GetProperty("RuntimeIdentifiers")) 614var supports = MSBuildStringUtility.Split(specItem.GetProperty("RuntimeSupports")) 678ProjectPath = item.GetProperty("ProjectPath"), 679ProjectUniqueName = item.GetProperty("ProjectReferenceUniqueName"), 682ApplyIncludeFlags(reference, item.GetProperty("IncludeAssets"), item.GetProperty("ExcludeAssets"), item.GetProperty("PrivateAssets")); 736var noWarn = MSBuildStringUtility.GetNuGetLogCodes(item.GetProperty("NoWarn")); 739string name = item.GetProperty("Id"); 776Aliases = item.GetProperty("Aliases"), 811var tfm = item.GetProperty("TargetFramework") ?? string.Empty; 813bool? restoreEnablePackagePruning = MSBuildStringUtility.GetBooleanOrNull(item.GetProperty("RestoreEnablePackagePruning")); 821var id = item.GetProperty("Id"); 822var versionString = item.GetProperty("VersionRange"); 867var id = item.GetProperty("Id"); 868var versionString = item.GetProperty("VersionRange"); 898return GetLibraryDependencyIncludeFlags(item.GetProperty("IncludeAssets"), item.GetProperty("ExcludeAssets"), item.GetProperty("PrivateAssets")); 919var frameworkReference = item.GetProperty("Id"); 921var privateAssets = item.GetProperty("PrivateAssets"); 950var rangeString = item.GetProperty(propertyName); 970spec.FilePath = specItem.GetProperty("ProjectPath"); 971spec.RestoreMetadata.ProjectName = specItem.GetProperty("ProjectName"); 975var tfmProperty = specItem.GetProperty("TargetFrameworks"); 1003var frameworksString = item.GetProperty("TargetFrameworks"); 1026return StringComparer.OrdinalIgnoreCase.Equals(type, item?.GetProperty("Type")); 1034var versionString = item.GetProperty("Version"); 1059var val = item.GetProperty(key); 1072treatWarningsAsErrors: specItem.GetProperty("TreatWarningsAsErrors"), 1073warningsAsErrors: specItem.GetProperty("WarningsAsErrors"), 1074noWarn: specItem.GetProperty("NoWarn"), 1075warningsNotAsErrors: specItem.GetProperty("WarningsNotAsErrors")); 1081specItem.GetProperty("RestorePackagesWithLockFile"), 1082specItem.GetProperty("NuGetLockFilePath"), 1101string enableAudit = specItem.GetProperty("NuGetAudit"); 1102string auditLevel = specItem.GetProperty("NuGetAuditLevel"); 1127string auditMode = item.GetProperty("NuGetAuditMode"); 1134string projectAuditMode = project.GetProperty("NuGetAuditMode"); 1172.Select(i => i.GetProperty("Id")); 1218string value = item.GetProperty(propertyName); 1230string value = item.GetProperty(propertyName); 1269string version = cv.GetProperty("VersionRange"); 1270CentralPackageVersion centralPackageVersion = new CentralPackageVersion(cv.GetProperty("Id"), string.IsNullOrWhiteSpace(version) ? VersionRange.All : VersionRange.Parse(version)); 1304var typeString = projectSpecItem.GetProperty("ProjectStyle");