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