Implemented interface member:
method
SetMetadata
Microsoft.Build.Framework.ITaskItem.SetMetadata(System.String, System.String)
255 references to SetMetadata
Crossgen2Tasks (14)
PrepareForReadyToRunCompilation.cs (14)
178r2rCompilationEntry.SetMetadata(MetadataKeys.OutputR2RImage, outputR2RImage); 181r2rCompilationEntry.SetMetadata(MetadataKeys.EmitSymbols, "true"); 182r2rCompilationEntry.SetMetadata(MetadataKeys.OutputPDBImage, outputPDBImage); 211pdbCompilationEntry.SetMetadata(MetadataKeys.OutputPDBImage, outputPDBImage); 212pdbCompilationEntry.SetMetadata(MetadataKeys.CreatePDBCommand, crossgen1CreatePDBCommand); 220r2rSymbolsFileToPublish.SetMetadata(MetadataKeys.RelativePath, outputPDBImageRelativePath); 224r2rSymbolsFileToPublish.SetMetadata(MetadataKeys.ExcludeFromSingleFile, "true"); 241r2rCompilationEntry.SetMetadata(MetadataKeys.OutputR2RImage, compositeR2RImage); 242r2rCompilationEntry.SetMetadata(MetadataKeys.CreateCompositeImage, "true"); 263r2rCompilationEntry.SetMetadata(MetadataKeys.EmitSymbols, "true"); 264r2rCompilationEntry.SetMetadata(MetadataKeys.OutputPDBImage, compositePDBImage); 269r2rSymbolsFileToPublish.SetMetadata(MetadataKeys.RelativePath, compositePDBRelativePath); 273r2rSymbolsFileToPublish.SetMetadata(MetadataKeys.ExcludeFromSingleFile, "true"); 286compositeR2RFileToPublish.SetMetadata(MetadataKeys.RelativePath, compositeR2RImageRelativePath);
Microsoft.Build.Engine.UnitTests (2)
TaskParameter_Tests.cs (2)
217baseItem.SetMetadata("a", "a1"); 218baseItem.SetMetadata("b", "b1");
Microsoft.Build.Tasks.Core (42)
AssemblyDependency\ReferenceTable.cs (8)
2728referenceItem.SetMetadata(ItemMetadataNames.version, reference.ReferenceVersion == null ? string.Empty : reference.ReferenceVersion.ToString()); 2793referenceItem.SetMetadata(ItemMetadataNames.msbuildReferenceSourceTarget, "ResolveAssemblyReference"); 2800referenceItem.SetMetadata(ItemMetadataNames.projectReferenceOriginalItemSpec, reference.PrimarySourceItem.GetMetadata("OriginalItemSpec")); 2819referenceItem.SetMetadata(ItemMetadataNames.winmdImplmentationFile, Path.GetFileName(reference.ImplementationAssembly)); 2833referenceItem.SetMetadata(ItemMetadataNames.winMDFileType, "Managed"); 2837referenceItem.SetMetadata(ItemMetadataNames.winMDFileType, "Native"); 2844referenceItem.SetMetadata(ItemMetadataNames.winMDFile, "true"); 2848referenceItem.SetMetadata(ItemMetadataNames.fusionName, fusionName);
CreateItem.cs (1)
193newItem.SetMetadata(FileUtilities.ItemSpecModifiers.RecursiveDir, match.wildcardDirectoryPart);
GetInstalledSDKLocations.cs (5)
168item.SetMetadata("SDKName", sdk.Key); 169item.SetMetadata("PlatformVersion", sdk.Value.Item2); 172item.SetMetadata(DirectoryRootsMetadataName, String.Join(";", SDKDirectoryRoots ?? [])); 173item.SetMetadata(ExtensionDirectoryRootsMetadataName, String.Join(";", SDKExtensionDirectoryRoots ?? [])); 174item.SetMetadata(RegistryRootMetadataName, SDKRegistryRoot);
GetSDKReferenceFiles.cs (21)
460outputItem.SetMetadata(ItemMetadataNames.msbuildReferenceSourceTarget, "ExpandSDKReference"); 464outputItem.SetMetadata(ItemMetadataNames.msbuildReferenceFromSDK, reference.SDKReferenceItem.GetMetadata("OriginalItemSpec")); 465outputItem.SetMetadata(ItemMetadataNames.msbuildReferenceGrouping, reference.SDKReferenceItem.GetMetadata("OriginalItemSpec")); 466outputItem.SetMetadata(ItemMetadataNames.msbuildReferenceGroupingDisplayName, reference.SDKReferenceItem.GetMetadata("DisplayName")); 469outputItem.SetMetadata("OriginalItemSpec", sdkIdentity); 470outputItem.SetMetadata("SDKRootPath", reference.SDKReferenceItem.ItemSpec); 471outputItem.SetMetadata("ResolvedFrom", "GetSDKReferenceFiles"); 479outputItem.SetMetadata(ItemMetadataNames.fusionName, referenceInfo.FusionName); 484outputItem.SetMetadata(ItemMetadataNames.imageRuntime, referenceInfo.ImageRuntime); 489outputItem.SetMetadata(ItemMetadataNames.winMDFile, "true"); 493outputItem.SetMetadata(ItemMetadataNames.winMDFileType, "Managed"); 497outputItem.SetMetadata(ItemMetadataNames.winMDFileType, "Native"); 502outputItem.SetMetadata("WinMDFile", "false"); 509outputItem.SetMetadata("CopyLocal", "true"); 526outputItem.SetMetadata("CopyLocal", "false"); 542outputItem.SetMetadata(ItemMetadataNames.msbuildReferenceSourceTarget, "ExpandSDKReference"); 545outputItem.SetMetadata("OriginalItemSpec", file.SDKReferenceItem.GetMetadata("OriginalItemSpec")); 546outputItem.SetMetadata("SDKRootPath", file.SDKReferenceItem.ItemSpec); 547outputItem.SetMetadata("ResolvedFrom", "GetSDKReferenceFiles"); 550outputItem.SetMetadata("TargetPath", file.TargetPath); 555outputItem.SetMetadata("Root", file.TargetRoot);
ResolveManifestFiles.cs (1)
687outputEntryPoint.SetMetadata("IncludeHash", manifestEntryPointList[i].includeHash);
ResolveProjectBase.cs (5)
184item.SetMetadata("ReferenceOutputAssembly", "false"); 185item.SetMetadata("LinkLibraryDependencies", "false"); 186item.SetMetadata("CopyLocal", "false"); 187item.SetMetadata("SkipGetTargetFrameworkProperties", "true"); 188item.SetMetadata("GlobalPropertiesToRemove", "TargetFramework");
SetRidAgnosticValueForProjects.cs (1)
52updatedItem.SetMetadata("IsRidAgnostic", isRidAgnosticArray[targetFrameworkIndex]);
Microsoft.Build.Tasks.UnitTests (105)
CommandLineBuilderExtension_Tests.cs (8)
33i.SetMetadata("Name", "Kenny"); 34i.SetMetadata("Private", "Yes"); // This is our flag. 54i.SetMetadata("Private", "Maybe"); // This is our flag. 74i.SetMetadata("Name", "Kenny"); 75i.SetMetadata("Access", "Private"); 79j.SetMetadata("Name", "Cartman"); 80j.SetMetadata("HintPath", @"c:\foo"); 81j.SetMetadata("Access", "Public");
CreateItem_Tests.cs (2)
249item.SetMetadata("MyMetaData", "SomePreserveMeValue"); 272item.SetMetadata("MyMetaData", "SomePreserveMeValue");
GetCompatiblePlatform_Tests.cs (21)
28projectReference.SetMetadata("Platforms", "x64;x86;AnyCPU"); 49projectReference.SetMetadata("Platforms", "x64;x86;AnyCPU"); 50projectReference.SetMetadata("platform", "x86"); 51projectReference.SetMetadata("OverridePlatformNegotiationValue", "x86"); 72projectReference.SetMetadata("Platforms", "x64;x86;AnyCPU"); 75projectReference.SetMetadata("PlatformLookupTable", "win32=x86"); 96projectReference.SetMetadata("Platforms", "x64;AnyCPU"); 117projectReference.SetMetadata("Platforms", "x64;AnyCPU"); 118projectReference.SetMetadata("Platform", "AnyCPU"); 139projectReference.SetMetadata("Platforms", "x86;x64;AnyCPU"); 140projectReference.SetMetadata("PlatformLookupTable", "x86=AnyCPU"); // matching platform takes priority over lookup tables 161projectReference.SetMetadata("Platforms", "x64"); 183projectReference.SetMetadata("Platforms", string.Empty); 184projectReference.SetMetadata("Platform", string.Empty); 207projectReference.SetMetadata("Platforms", "x64"); 232projectReference.SetMetadata("Platforms", "x64;x86"); 233projectReference.SetMetadata("PlatformLookupTable", "x86=;b=d"); 259projectReference.SetMetadata("Platforms", referencedPlatforms); 260projectReference.SetMetadata("Platform", referencedPlatform); 281projectReference.SetMetadata("Platforms", "AnyCPU;x64"); 282projectReference.SetMetadata("Platform", "AnyCPU");
ResolveNonMSBuildProjectOutput_Tests.cs (3)
34reference.SetMetadata(attributeProject, projectGuid); 39reference.SetMetadata("Package", package); 44reference.SetMetadata("Name", name);
ResolveSDKReference_Tests.cs (2)
1238referenceItem.SetMetadata("SDKName", "GoodTestSDK, Version=2.0"); 1272referenceItem.SetMetadata("SDKName", "DifferentSDK, Version=2.0");
ResourceHandling\GenerateResource_Tests.cs (2)
3367reference.SetMetadata("FusionName", "ClassLibrary20, version=1.0.0.0, Culture=neutral, PublicKeyToken=null"); 3925referenceItem.SetMetadata(ItemMetadataNames.fusionName, "System.Resources.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51");
WriteCodeFragment_Tests.cs (67)
347attribute1.SetMetadata("Name", "Microsoft"); 349attribute2.SetMetadata("Culture", "en-US"); 424attribute.SetMetadata("Company", "Microsoft"); 425attribute.SetMetadata("Year", "2009"); 455attribute.SetMetadata("Company", "Microsoft"); 456attribute.SetMetadata("Company", "2009"); 478attribute.SetMetadata("_ParameterXXXXXXXXXX", "Microsoft"); 501attribute.SetMetadata("_Parameter1", "Microsoft"); 502attribute.SetMetadata("_Parameter2", "2009"); 525attribute.SetMetadata("_Parameter1", "TestValue"); 526attribute.SetMetadata("_Parameter2", "TestValue"); 557attribute.SetMetadata("_Parameter1", multilineString); 558attribute.SetMetadata("Description", multilineString); 593attribute.SetMetadata("_Parameter1", multilineString); 594attribute.SetMetadata("Description", multilineString); 626attribute.SetMetadata("_Parameter2", "2009"); 649attribute.SetMetadata("_ParameterX", "2009"); 672attribute.SetMetadata("_Parameter", "2009"); 695attribute.SetMetadata("_Parameter1", "Microsoft"); 696attribute.SetMetadata("Date", "2009"); 697attribute.SetMetadata("Copyright", "(C)"); 728attribute.SetMetadata("_Parameter1", "Microsoft"); 729attribute.SetMetadata("_Parameter2", "2009"); 730attribute.SetMetadata("Copyright", "(C)"); 754attribute.SetMetadata("_Parameter1", "True"); 755attribute.SetMetadata("_Parameter1_TypeName", "System.Boolean"); 770attribute.SetMetadata("BoolArgument", "False"); 771attribute.SetMetadata("BoolArgument_TypeName", "System.Boolean"); 772attribute.SetMetadata("Int32Argument", "42"); 773attribute.SetMetadata("Int32Argument_TypeName", "System.Int32"); 788attribute.SetMetadata("BoolArgument", "False"); 789attribute.SetMetadata("BoolArgument_TypeName", "System.Boolean"); 790attribute.SetMetadata("Int32Argument_TypeName", "System.Int32"); 804attribute.SetMetadata("TestParameter", "99"); 805attribute.SetMetadata("TestParameter_TypeName", "Foo.Bar"); 819attribute.SetMetadata("TestParameter", "99"); 820attribute.SetMetadata("TestParameter_TypeName", "System.Boolean"); 834attribute.SetMetadata("TestParameter", "1000"); 835attribute.SetMetadata("TestParameter_TypeName", "System.Byte"); 849attribute.SetMetadata("_Parameter1", "Local"); 850attribute.SetMetadata("_Parameter1_TypeName", "System.DateTimeKind"); 864attribute.SetMetadata("_Parameter1", "System.Console"); 865attribute.SetMetadata("_Parameter1_TypeName", "System.Type"); 879attribute.SetMetadata("_Parameter1", "System.Console"); 880attribute.SetMetadata("_Parameter1_TypeName", "System.Type"); 895attribute.SetMetadata("_Parameter1", "1,2,3"); 896attribute.SetMetadata("_Parameter1_TypeName", "System.Int32[]"); 911attribute.SetMetadata("_Parameter1", "42 /* A comment */"); 912attribute.SetMetadata("_Parameter1_IsLiteral", "true"); 927attribute.SetMetadata("TestParameter", "42 /* A comment */"); 928attribute.SetMetadata("TestParameter_IsLiteral", "true"); 943attribute.SetMetadata("_Parameter1", "True"); 958attribute.SetMetadata("_Parameter1", "MyAssembly"); 959attribute.SetMetadata("AllInternalsVisible", "True"); 975attribute.SetMetadata("_Parameter1", "a"); 976attribute.SetMetadata("_Parameter2", "b"); 977attribute.SetMetadata("_Parameter3", "false"); 1003attribute.SetMetadata("_Parameter1", "2"); 1019attribute.SetMetadata("_Parameter1", "PublicKey"); 1035attribute.SetMetadata("_Parameter1", "false"); 1050attribute.SetMetadata("_Parameter1", "True"); // Should be a boolean. Will be converted. 1051attribute.SetMetadata("_Parameter2", "42"); // Should be a boolean. Will fail type conversion. 1065attribute.SetMetadata("_Parameter1", "foo"); // Inferred as string. 1066attribute.SetMetadata("_Parameter2", @"""bar"" /* setting */"); // Literal string. 1067attribute.SetMetadata("_Parameter2_IsLiteral", "true"); 1068attribute.SetMetadata("_Parameter3", "False"); // Typed as boolean. 1069attribute.SetMetadata("_Parameter3_TypeName", "System.Boolean");
Microsoft.Build.Utilities.Core (1)
TaskItem.cs (1)
476void ITaskItem2.SetMetadataValueLiteral(string metadataName, string metadataValue) => SetMetadata(metadataName, EscapingUtilities.Escape(metadataValue));
Microsoft.Build.Utilities.UnitTests (15)
TaskItem_Tests.cs (15)
30from.SetMetadata("Dog", "Bingo"); 31from.SetMetadata("Cat", "Morris"); 41to.SetMetadata("CaT", ""); 56from.SetMetadata("Dog", "Bingo"); 57from.SetMetadata("Cat", "Morris"); 58from.SetMetadata("Bird", "Big"); 62to.SetMetadata("Sponge", "Bob"); 63to.SetMetadata("Dog", "Harriet"); 64to.SetMetadata("Cat", "Mike"); 96taskItem.SetMetadata("m", "m1"); 138t.SetMetadata(FileUtilities.ItemSpecModifiers.FullPath, "bazbaz"); 175t.SetMetadata("grog", "RUM"); 286item.SetMetadata(null, "x"); 298item.SetMetadata("", "x"); 323item.SetMetadata("m", null);
Microsoft.DotNet.Build.Tasks.Feed.Tests (3)
SetupTargetFeedConfigV3Tests.cs (3)
61installersKey.SetMetadata("Key", InstallersTargetStaticFeedKey); 63checksumsKey.SetMetadata("Key", ChecksumsTargetStaticFeedKey); 65azureDevops.SetMetadata("Key", AzureDevOpsFeedsKey);
Microsoft.DotNet.Build.Tasks.Packaging (36)
ApplyMetaPackages.cs (1)
133item.SetMetadata("TargetFramework", targetFramework.GetShortFolderName());
ApplyPreReleaseSuffix.cs (2)
99updatedPackage.SetMetadata("Version", packageVersion.ToString() + GetSuffix(packageId)); 104updatedPackage.SetMetadata("Version", packageVersion.ToString());
CreateTrimDependencyGroups.cs (3)
132item.SetMetadata("TargetFramework", newDependencyGroup.TargetFramework.GetShortFolderName()); 141item.SetMetadata("CopiedFromTargetFramework", item.GetMetadata("TargetFramework")); 142item.SetMetadata("TargetFramework", newDependencyGroup.TargetFramework.GetShortFolderName());
GetApplicableAssetsFromPackageReports.cs (3)
101item.SetMetadata("PackagePath", asset.PackagePath); 102item.SetMetadata("NuGetPackageId", id); 103item.SetMetadata("NuGetPackageVersion", version);
GetApplicableAssetsFromPackages.cs (1)
216pdbItem.SetMetadata("TargetPath", Path.ChangeExtension(packageItem.TargetPath, ".pdb"));
GetAssemblyReferences.cs (2)
64referenceItem.SetMetadata("Version", reference.Version.ToString()); 65referenceItem.SetMetadata("AssemblyVersion", reference.Version.ToString());
GetLastStablePackage.cs (1)
165item.SetMetadata("Version", version.ToString(3));
GetLayoutFiles.cs (4)
130item.SetMetadata("Destination", destination); 131item.SetMetadata("AssetType", assetType); 144symbolItem.SetMetadata("Destination", symbolDestination); 145symbolItem.SetMetadata("AssetType", assetType);
GetPackageDestination.cs (1)
170item.SetMetadata("TargetFramework", framework);
GetPackageFromModule.cs (1)
68packageReferenced.SetMetadata("NativeLibrary", moduleName);
GetSupportedPackagesFromPackageReports.cs (4)
41supportedPackage.SetMetadata("Version", packageVersion); 42supportedPackage.SetMetadata("TargetFramework", fx); 43supportedPackage.SetMetadata("TargetFrameworkShort", nugetFx.GetShortFolderName()); 49supportedPackage.SetMetadata("RuntimeIdentifiers", ridList);
HarvestPackage.cs (8)
234supportedFramework.SetMetadata("HarvestedFromPackage", package); 255supportedFramework.SetMetadata("Version", version); 430item.SetMetadata("TargetPath", targetPath); 432item.SetMetadata("TargetFramework", targetFramework); 435item.SetMetadata("HarvestDependencies", harvestDependencies.ToString()); 436item.SetMetadata("IsReferenceAsset", IsReferencePackagePath(targetPath).ToString()); 442item.SetMetadata("AssemblyVersion", assemblyVersion.ToString()); 445item.SetMetadata("HarvestedFrom", $"{PackageId}/{PackageVersion}/{harvestPackagePath}");
PackageReport.cs (2)
168item.SetMetadata(nameof(AdditionalProperties), AdditionalProperties); 169item.SetMetadata(nameof(UndefineProperties), UndefineProperties);
PromoteDependencies.cs (1)
98copiedDepenedency.SetMetadata(TargetFrameworkMetadataName, targetFramework.GetShortFolderName());
SplitDependenciesBySupport.cs (1)
98newItem.SetMetadata("TargetFramework", framework.GetShortFolderName());
SplitReferences.cs (1)
94emptyItem.SetMetadata("TargetFramework", TargetFramework);
Microsoft.DotNet.Build.Tasks.Packaging.Tests (10)
ApplyBaseLineTests.cs (1)
145item.SetMetadata("Version", version);
CreateTrimDependencyGroupsTests.cs (4)
408item.SetMetadata("TargetPath", targetPath); 409item.SetMetadata("TargetFramework", targetFramework); 418item.SetMetadata("Version", version); 421item.SetMetadata("TargetFramework", targetFramework);
GenerateNuSpecAndPackTests.cs (2)
67item.SetMetadata("Version", version); 70item.SetMetadata("TargetFramework", targetFramework);
GetLastStablePackageTests.cs (1)
218item.SetMetadata("Version", version);
HarvestPackageTests.cs (2)
56item.SetMetadata("RuntimeIDs", rids); 174item.SetMetadata("Version", version);
Microsoft.DotNet.Build.Tasks.TargetFramework (1)
ChooseBestP2PTargetFrameworkTask.cs (1)
97itemWithProperties.SetMetadata(NEAREST_TARGET_FRAMEWORK, nearestNuGetFramework);
Microsoft.DotNet.Build.Tasks.Workloads (4)
Msi\MsiBase.wix.cs (4)
233msiItem.SetMetadata(Workloads.Metadata.Platform, Platform); 234msiItem.SetMetadata(Workloads.Metadata.WixObj, compilerOutputPath); 235msiItem.SetMetadata(Workloads.Metadata.Version, $"{Metadata.MsiVersion}"); 236msiItem.SetMetadata(Workloads.Metadata.SwixPackageId, Metadata.SwixPackageId);
Microsoft.DotNet.Build.Tasks.Workloads.Tests (4)
Extensions.cs (1)
12item.SetMetadata(metadataName, metadataValue);
SwixPackageTests.cs (3)
24msiItem.SetMetadata(Metadata.SwixPackageId, "Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100"); 25msiItem.SetMetadata(Metadata.Version, "6.0.0.0"); 26msiItem.SetMetadata(Metadata.Platform, "x64");
Microsoft.DotNet.PackageTesting (3)
GetCompatiblePackageTargetFrameworks.cs (3)
114supportedPackage.SetMetadata("Version", version); 115supportedPackage.SetMetadata("TargetFramework", framework.ToString()); 116supportedPackage.SetMetadata("TargetFrameworkShort", framework.GetShortFolderName());
Microsoft.DotNet.SharedFramework.Sdk (4)
src\GeneratePlatformManifestEntriesFromFileList.cs (2)
39item.SetMetadata("AssemblyVersion", entry.AssemblyVersion); 40item.SetMetadata("FileVersion", entry.FileVersion);
src\GeneratePlatformManifestEntriesFromTemplate.cs (2)
90item.SetMetadata("AssemblyVersion", entry.AssemblyVersion); 95item.SetMetadata("FileVersion", entry.FileVersion);
Microsoft.DotNet.XliffTasks (4)
Tasks\GatherXlf.cs (3)
40xlf.SetMetadata(MetadataKey.XlfSource, source.ItemSpec); 41xlf.SetMetadata(MetadataKey.XlfTranslatedFullPath, GetTranslatedOutputPath(source, language, outputPaths)); 42xlf.SetMetadata(MetadataKey.XlfLanguage, language);
Tasks\TransformTemplates.cs (1)
119item.SetMetadata("Culture", templateCulture);
Microsoft.Extensions.ApiDescription.Client (3)
GetOpenApiReferenceMetadata.cs (3)
75newItem.SetMetadata("FirstForGenerator", "true"); 79newItem.SetMetadata("FirstForGenerator", "false"); 127newItem.SetMetadata("SerializedMetadata", MetadataSerializer.SerializeMetadata(newItem));
PresentationBuildTasks (4)
Microsoft\Build\Tasks\Windows\MarkupCompilePass1.cs (1)
1606bamlItem.SetMetadata(listCarryOverAttribute[j], attributeValue);
Microsoft\Build\Tasks\Windows\MarkupCompilePass2.cs (3)
797bamlItem.SetMetadata(SharedStrings.Localizable, localizable ? "True" : "False"); 798bamlItem.SetMetadata(SharedStrings.Link, linkAlias); 799bamlItem.SetMetadata(SharedStrings.LogicalName, logicalName);