85 references to SetMetadata
Microsoft.Build (13)
BackEnd\Components\RequestBuilder\Lookup.cs (1)
865itemToModify.SetMetadata(modificationPair.Key, modificationPair.Value.NewValue);
Construction\Solution\SolutionProjectGenerator.cs (8)
1063item.SetMetadata("ToolsVersion", GetToolsVersionMetadataForDirectMSBuildTask(traversalProject)); 1064item.SetMetadata("SkipNonexistentProjects", "False"); // Skip if it doesn't exist on disk. 1065item.SetMetadata("AdditionalProperties", GetPropertiesMetadataForProjectReference(traversalProject, GetConfigurationAndPlatformPropertiesString(projectConfiguration))); 1071item.SetMetadata("ToolsVersion", traversalProject.ToolsVersion); 1072item.SetMetadata("SkipNonexistentProjects", "Build"); // Instruct the MSBuild task to try to build even though the file doesn't exist on disk. 1073item.SetMetadata("AdditionalProperties", GetPropertiesMetadataForProjectReference(traversalProject, SolutionConfigurationAndPlatformProperties)); 1080item.SetMetadata("Configuration", projectConfiguration.ConfigurationName); 1081item.SetMetadata("Platform", projectConfiguration.PlatformName);
Graph\GraphBuilder.cs (1)
681mergedItem.SetMetadata(ItemMetadataNames.ProjectReferenceTargetsMetadataName, $"{existingTargetsMetadata};{newTargetsMetadata}");
Instance\ProjectItemInstance.cs (3)
247/// This is a read-only collection. To modify the metadata, use <see cref="SetMetadata(string, string)"/>. 459return SetMetadata(metadataElement.Name, evaluatedInclude); 492SetMetadata(metadataName, metadataValue);
Microsoft.Build.Engine.OM.UnitTests (17)
Instance\ProjectInstance_Tests.cs (1)
792Helpers.VerifyAssertThrowsInvalidOperation(delegate () { Helpers.GetFirst(instance.Items).SetMetadata("a", "b"); });
Instance\ProjectItemInstance_Tests.cs (15)
96item.SetMetadata("m1", "v0"); 97item.SetMetadata("m1", "v1"); 98item.SetMetadata("m2", "v2"); 134item.SetMetadata("m1", "v1"); 135item.SetMetadata("m2", "v0"); 165fromItem.SetMetadata("m1", "v1"); 166fromItem.SetMetadata("m2", "v2"); 268item.SetMetadata("m", "m1"); 279item.SetMetadata("m", String.Empty); 291item.SetMetadata("m", null); 304item.SetMetadata(null, "m1"); 316item.SetMetadata(String.Empty, "m1"); 326item.SetMetadata("m", "m1"); 350item.SetMetadata("m", "m1"); 351item.SetMetadata("m;", "m%3b1");
Instance\ProjectMetadataInstance_Tests.cs (1)
37ProjectMetadataInstance metadata = item.SetMetadata("m", "m1");
Microsoft.Build.Engine.UnitTests (55)
BackEnd\BatchingEngine_Tests.cs (3)
137a.SetMetadata("Culture", "fr-fr"); 138b.SetMetadata("Culture", "en-en"); 176a.SetMetadata("Culture", "fr-fr");
BackEnd\IntrinsicTask_Tests.cs (8)
3930item1.SetMetadata("m", "m1"); 3931item1.SetMetadata("n", "n1"); 3932item2.SetMetadata("m", "m2"); 3933item2.SetMetadata("n", "n2"); 3934item3.SetMetadata("m", "m2"); 3935item3.SetMetadata("n", "n2"); 3936item4.SetMetadata("m", "m3"); 3937item4.SetMetadata("n", "n3");
BackEnd\Lookup_Tests.cs (23)
408item1.SetMetadata("m1", "m1"); 409item1.SetMetadata("m2", "m2"); 472item1.SetMetadata("m1", "m1"); 473item1.SetMetadata("m2", "m2"); 532item1.SetMetadata("m1", "m1"); 533item1.SetMetadata("m2", "m2"); 603item1.SetMetadata("m1", "m1"); 604item1.SetMetadata("m2", "m2"); 670item1.SetMetadata("m1", "m1"); 671item1.SetMetadata("m2", "m2"); 725item1.SetMetadata("m1", "m1"); 726item1.SetMetadata("m2", "m2"); 773item1.SetMetadata("m", "m1"); 827item1.SetMetadata("m", "m1"); 868item1.SetMetadata("m", "m1"); 903item1.SetMetadata("m", "m1"); 904item1.SetMetadata("n", "n1"); 905item1.SetMetadata("o", "o1"); 976item1.SetMetadata("m", "m1"); 1031item1.SetMetadata("m", "m1"); 1080item1.SetMetadata("m", "m1"); 1135item1.SetMetadata("m", "m1"); 1170item1.SetMetadata("m", "m1");
BackEnd\TaskExecutionHost_Tests.cs (3)
1274item.SetMetadata("Culture", "fr-fr"); 1280item.SetMetadata("HintPath", "c:\\foo"); 1281item2.SetMetadata("HintPath", "c:\\bar");
BackEnd\TaskRegistry_Tests.cs (2)
2217iag.SetMetadata("aaa", "111"); 2221iag.SetMetadata("bbb", "222");
Evaluation\Expander_Tests.cs (15)
761pi.SetMetadata("Meta" + m.ToString(), Path.Combine(s_rootPathPrefix, "firstdirectory", "seconddirectory", "file") + m.ToString() + ".ext"); 763pi.SetMetadata("Meta9", Path.Combine("seconddirectory", "file.ext")); 764pi.SetMetadata("Meta10", String.Format(";{0};{1};", Path.Combine("someo%3bherplace", "foo.txt"), Path.Combine("secondd%3brectory", "file.ext"))); 765pi.SetMetadata("MetaBlank", @""); 769pi.SetMetadata("Even", "true"); 770pi.SetMetadata("Odd", "false"); 774pi.SetMetadata("Even", "false"); 775pi.SetMetadata("Odd", "true"); 1372i1.SetMetadata("aaa", "111"); 1376i2.SetMetadata("bbb", "222"); 1381i3.SetMetadata("ccc", "333"); 1386i4.SetMetadata("ddd", "444"); 1389i5.SetMetadata("eee", "555"); 1394i6.SetMetadata("fff", "666"); 1584item.SetMetadata("Foo", $"ThisIsAFairlyLongMetadataValue_{i}");
Instance\ProjectMetadataInstance_Internal_Tests.cs (1)
59ProjectMetadataInstance metadata = item.SetMetadata("m", "m1");