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)
157 references to GetProperty
NuGet.Build.Tasks.Console (66)
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 (62)
274var privateAssets = MSBuildStringUtility.Split(frameworkReferenceItem.GetProperty("PrivateAssets")); 295string versionRanges = projectItemInstance.GetProperty("Version"); 329string version = projectItemInstance.GetProperty("Version"); 355string version = packageReferenceItem.GetProperty("Version"); 364string versionOverrideString = packageReferenceItem.GetProperty("VersionOverride"); 375ImmutableArray<NuGetLogCode> noWarn = MSBuildStringUtility.GetNuGetLogCodes(packageReferenceItem.GetProperty("NoWarn")); 381Aliases = packageReferenceItem.GetProperty("Aliases"), 382IncludeType = GetLibraryIncludeFlags(packageReferenceItem.GetProperty("IncludeAssets"), LibraryIncludeFlags.All) & ~GetLibraryIncludeFlags(packageReferenceItem.GetProperty("ExcludeAssets"), LibraryIncludeFlags.None), 387SuppressParent = GetLibraryIncludeFlags(packageReferenceItem.GetProperty("PrivateAssets"), LibraryIncludeFlagUtils.DefaultSuppressParent), 405string versionString = projectItemInstance.GetProperty("Version"); 422() => UriUtility.GetAbsolutePath(project.Directory, project.GetProperty("RestorePackagesPath")), 433string packageId = project.GetProperty("PackageId"); 441string assemblyName = project.GetProperty("AssemblyName"); 450return project.GetProperty("MSBuildProjectName"); 470string fullPath = projectReferenceItem.GetProperty("FullPath"); 474ExcludeAssets = GetLibraryIncludeFlags(projectReferenceItem.GetProperty("ExcludeAssets"), LibraryIncludeFlags.None), 475IncludeAssets = GetLibraryIncludeFlags(projectReferenceItem.GetProperty("IncludeAssets"), LibraryIncludeFlags.All), 476PrivateAssets = GetLibraryIncludeFlags(projectReferenceItem.GetProperty("PrivateAssets"), LibraryIncludeFlagUtils.DefaultSuppressParent), 544var targetFrameworks = project.GetProperty("TargetFrameworks"); 547targetFrameworks = project.GetProperty("TargetFramework"); 560string version = project.GetProperty("PackageVersion") ?? project.GetProperty("Version"); 577string version = project.GetProperty("NETCoreSdkVersion"); 597() => UriUtility.GetAbsolutePath(project.Directory, project.GetProperty("RestoreRepositoryPath")), 601string solutionDir = project.GetProperty("SolutionPath"); 618string outputPath = project.GetProperty("RestoreOutputPath") ?? project.GetProperty("MSBuildProjectExtensionsPath"); 637innerNodes.SelectMany(i => MSBuildStringUtility.Split(i.GetProperty("RestoreAdditionalProjectSources"))), 651return project.GetProperty("TargetFramework") == null && project.GetProperty("TargetFrameworks") == null; 738targetFrameworkMoniker: msBuildProjectInstance.GetProperty("TargetFrameworkMoniker"), 739targetPlatformMoniker: msBuildProjectInstance.GetProperty("TargetPlatformMoniker"), 740targetPlatformMinVersion: msBuildProjectInstance.GetProperty("TargetPlatformMinVersion"), 741clrSupport: msBuildProjectInstance.GetProperty("CLRSupport"), 742windowsTargetPlatformMinVersion: msBuildProjectInstance.GetProperty("WindowsTargetPlatformMinVersion")); 744var packageTargetFallback = MSBuildStringUtility.Split(msBuildProjectInstance.GetProperty("PackageTargetFallback")).Select(NuGetFramework.Parse).ToList(); 746var assetTargetFallbackEnum = MSBuildStringUtility.Split(msBuildProjectInstance.GetProperty(nameof(TargetFrameworkInformation.AssetTargetFallback))).Select(NuGetFramework.Parse).ToList(); 760bool? restoreEnablePackagePruning = MSBuildStringUtility.GetBooleanOrNull(msBuildProjectInstance.GetProperty("RestoreEnablePackagePruning")); 774RuntimeIdentifierGraphPath = msBuildProjectInstance.GetProperty(nameof(TargetFrameworkInformation.RuntimeIdentifierGraphPath)), 964project.GetProperty("RestoreSolutionDirectory"), 965project.GetProperty("RestoreRootConfigDirectory") ?? project.Directory, 966UriUtility.GetAbsolutePath(project.Directory, project.GetProperty("RestoreConfigFile")), 986MSBuildStringUtility.Split($"{project.GetProperty("RuntimeIdentifiers")};{project.GetProperty("RuntimeIdentifier")}") 987.Concat(projectsByTargetFramework.Values.SelectMany(i => MSBuildStringUtility.Split($"{i.GetProperty("RuntimeIdentifiers")};{i.GetProperty("RuntimeIdentifier")}"))) 991MSBuildStringUtility.Split(project.GetProperty("RuntimeSupports")) 1047projectsByTargetFramework.Count > 1 || !string.IsNullOrWhiteSpace(project.GetProperty("TargetFrameworks"))), 1049project.GetProperty("MSBuildStartupDirectory"), 1053innerNodes.SelectMany(i => MSBuildStringUtility.Split(i.GetProperty("RestoreAdditionalProjectFallbackFolders"))), 1054innerNodes.SelectMany(i => MSBuildStringUtility.Split(i.GetProperty("RestoreAdditionalProjectFallbackFoldersExcludes"))), 1079restoreMetadata.ProjectWideWarningProperties = WarningProperties.GetWarningProperties(project.GetProperty("TreatWarningsAsErrors"), project.GetProperty("WarningsAsErrors"), project.GetProperty("NoWarn"), project.GetProperty("WarningsNotAsErrors")); 1080restoreMetadata.RestoreLockProperties = new RestoreLockProperties(project.GetProperty("RestorePackagesWithLockFile"), project.GetProperty("NuGetLockFilePath"), project.IsPropertyTrue("RestoreLockedMode")); 1083restoreMetadata.UsingMicrosoftNETSdk = MSBuildRestoreUtility.GetUsingMicrosoftNETSdk(project.GetProperty("UsingMicrosoftNETSdk")); 1084restoreMetadata.SdkAnalysisLevel = MSBuildRestoreUtility.GetSdkAnalysisLevel(project.GetProperty("SdkAnalysisLevel")); 1092ProjectStyle? projectStyleOrNull = BuildTasksUtility.GetProjectRestoreStyleFromProjectProperty(project.GetProperty("RestoreProjectStyle")); 1098projectName: 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 (68)
RestoreCommand\Utility\MSBuildRestoreUtility.cs (68)
69var projectUniqueName = item.GetProperty("ProjectUniqueName"); 183result.RestoreMetadata.ProjectPath = specItem.GetProperty("ProjectPath"); 184result.RestoreMetadata.ProjectUniqueName = specItem.GetProperty("ProjectUniqueName"); 201foreach (var source in MSBuildStringUtility.Split(specItem.GetProperty("Sources"))) 208foreach (var configFilePath in MSBuildStringUtility.Split(specItem.GetProperty("ConfigFilePaths"))) 213foreach (var folder in MSBuildStringUtility.Split(specItem.GetProperty("FallbackFolders"))) 218result.RestoreMetadata.PackagesPath = specItem.GetProperty("PackagesPath"); 219result.RestoreMetadata.OutputPath = specItem.GetProperty("OutputPath"); 275pcRestoreMetadata.PackagesConfigPath = specItem.GetProperty("PackagesConfigPath"); 276pcRestoreMetadata.RepositoryPath = specItem.GetProperty("RepositoryPath"); 277var solutionDir = specItem.GetProperty("SolutionDir"); 293result.RestoreMetadata.UsingMicrosoftNETSdk = GetUsingMicrosoftNETSdk(specItem.GetProperty("UsingMicrosoftNETSdk")); 294result.RestoreMetadata.SdkAnalysisLevel = GetSdkAnalysisLevel(specItem.GetProperty("SdkAnalysisLevel")); 297result.RestoreSettings.SdkVersion = GetSdkAnalysisLevel(specItem.GetProperty("NETCoreSdkVersion")); 440var frameworkString = item.GetProperty("TargetFramework"); 441var targetFrameworkMoniker = item.GetProperty("TargetFrameworkMoniker"); 442var targetPlatforMoniker = item.GetProperty("TargetPlatformMoniker"); 443var targetPlatformMinVersion = item.GetProperty("TargetPlatformMinVersion"); 444var clrSupport = item.GetProperty("CLRSupport"); 445var windowsTargetPlatformMinVersion = item.GetProperty("WindowsTargetPlatformMinVersion"); 468var packageTargetFallback = MSBuildStringUtility.Split(item.GetProperty("PackageTargetFallback")) 472var assetTargetFallbackList = MSBuildStringUtility.Split(item.GetProperty(AssetTargetFallbackUtility.AssetTargetFallback)) 482runtimeIdentifierGraphPath = item.GetProperty("RuntimeIdentifierGraphPath"); 525var runtimes = MSBuildStringUtility.Split(specItem.GetProperty("RuntimeIdentifiers")) 530var supports = MSBuildStringUtility.Split(specItem.GetProperty("RuntimeSupports")) 593ProjectPath = item.GetProperty("ProjectPath"), 594ProjectUniqueName = item.GetProperty("ProjectReferenceUniqueName"), 597ApplyIncludeFlags(reference, item.GetProperty("IncludeAssets"), item.GetProperty("ExcludeAssets"), item.GetProperty("PrivateAssets")); 651var noWarn = MSBuildStringUtility.GetNuGetLogCodes(item.GetProperty("NoWarn")); 654string name = item.GetProperty("Id"); 691Aliases = item.GetProperty("Aliases"), 726var tfm = item.GetProperty("TargetFramework") ?? string.Empty; 728bool? restoreEnablePackagePruning = MSBuildStringUtility.GetBooleanOrNull(item.GetProperty("RestoreEnablePackagePruning")); 736var id = item.GetProperty("Id"); 737var versionString = item.GetProperty("VersionRange"); 783var id = item.GetProperty("Id"); 784var versionString = item.GetProperty("VersionRange"); 814return GetLibraryDependencyIncludeFlags(item.GetProperty("IncludeAssets"), item.GetProperty("ExcludeAssets"), item.GetProperty("PrivateAssets")); 835var frameworkReference = item.GetProperty("Id"); 838var privateAssets = item.GetProperty("PrivateAssets"); 867var rangeString = item.GetProperty(propertyName); 887spec.FilePath = specItem.GetProperty("ProjectPath"); 888spec.RestoreMetadata.ProjectName = specItem.GetProperty("ProjectName"); 892var tfmProperty = specItem.GetProperty("TargetFrameworks"); 920var frameworksString = item.GetProperty("TargetFrameworks"); 936return StringComparer.OrdinalIgnoreCase.Equals(type, item?.GetProperty("Type")); 944var versionString = item.GetProperty("Version"); 969var val = item.GetProperty(key); 982treatWarningsAsErrors: specItem.GetProperty("TreatWarningsAsErrors"), 983warningsAsErrors: specItem.GetProperty("WarningsAsErrors"), 984noWarn: specItem.GetProperty("NoWarn"), 985warningsNotAsErrors: specItem.GetProperty("WarningsNotAsErrors")); 991specItem.GetProperty("RestorePackagesWithLockFile"), 992specItem.GetProperty("NuGetLockFilePath"), 998string enableAudit = specItem.GetProperty("NuGetAudit"); 999string auditLevel = specItem.GetProperty("NuGetAuditLevel"); 1024string auditMode = item.GetProperty("NuGetAuditMode"); 1031string projectAuditMode = project.GetProperty("NuGetAuditMode"); 1069.Select(i => i.GetProperty("Id")); 1115string value = item.GetProperty(propertyName); 1127string value = item.GetProperty(propertyName); 1165string version = cv.GetProperty("VersionRange"); 1166CentralPackageVersion centralPackageVersion = new CentralPackageVersion(cv.GetProperty("Id"), string.IsNullOrWhiteSpace(version) ? VersionRange.All : VersionRange.Parse(version)); 1200var typeString = projectSpecItem.GetProperty("ProjectStyle");