97 references to AddItem
dotnet-openapi (1)
ProjectExtensions.cs (1)
14var item = project.AddItem(tagName, include).Single();
Microsoft.Build.Engine.OM.UnitTests (84)
Construction\ProjectFormatting_Tests.cs (10)
118project.AddItem("Compile", "Class1.cs"); 154project.AddItem("Compile", "Class2.cs"); 189project.AddItem("Compile", "Program.cs"); 221project.AddItem("Compile", "Program.cs"); 250project.AddItem("Compile", "Program.cs"); 561var item = project.AddItem("ProjectReference", @"..\CLREXE\CLREXE.vcxproj"); 582var item = project.AddItem("NotProjectReference", @"..\CLREXE\CLREXE.vcxproj"); 604var item = project.AddItem("NotProjectReference", @"..\CLREXE\CLREXE.vcxproj"); 627var item = project.AddItem("NotProjectReference", @"..\CLREXE\CLREXE.vcxproj"); 695project.AddItem("Compile", "Program.cs");
Construction\ProjectItemElement_Tests.cs (3)
958ProjectItem item = project.AddItem("i", "i1")[0]; 974ProjectItem item = project.AddItem("i", "i1")[0]; 990ProjectItem item = project.AddItem("i", "i1")[0];
Definition\DefinitionEditing_Tests.cs (48)
122new SetupProject(p => { p.AddItem("a", "1.foo"); }) 137p.AddItem("a", "1.foo"); 138p.AddItem("a", "2.foo"); 152project.AddItem("i", "i1"); 179project.AddItem("i", "i%281%29"); 234project.AddItem("i", String.Empty); 269project.AddItem("i", "$(p)"); 290project.AddItem("i", wildcard); 313project.AddItem("h", "h1"); 316ProjectItem item = project.AddItem("i", "@(h)")[0]; 329IList<ProjectItem> items = project.AddItem( 349project.AddItem("i", "*.xxx"); 373project.AddItem("i", "i1.xxx;i2.xxx"); 398project.AddItem("i", "i1"); 424project.AddItem("i", "i1.xxx"); 450project.AddItem("i", "i1.xxx"); 474ProjectItemElement item2 = project.AddItem("i", "i1.xxx")[0].Xml; 499project.AddItem("j", "j1.xxx"); 528project.AddItem( 561ProjectItemElement item2 = project.AddItem("i", @"c:\subdir1\a\b\c\i1.xyx")[0].Xml; 590project.AddItem("i", "i1.xxx"); 645project.AddItem("i", "i1.xxx"); 834project.AddItem("i", "i1.xxx"); 857project.AddItem("i", "*.xxx"); 858project.AddItem("i", "i1"); 885project.AddItem("i", "i1"); 912project.AddItem("h", "h1"); 913project.AddItem("i", "i1"); 939project.AddItem("h", "h1"); 940project.AddItem("h", "h2"); 941project.AddItem("i", "i1"); 971project.AddItem("i", "i1"); 1139project.AddItem("i", wildcard); 1170project.AddItem("i", "i1"); 1210ProjectItem item0 = project.AddItem("i", "i1")[0]; 1303project.AddItem("i", "i1"); 1559project.AddItem("i", "i1"); 1622var metadatum = project.AddItem("i", "i1")[0].SetMetadataValue("p", "v1"); 1637var item = project.AddItem("i", "i1")[0]; 1652var item = project.AddItem("i", "i1")[0]; 1726var metadatum = project.AddItem("i", "i1")[0].SetMetadataValue("p", "v1"); 1741var metadatum = project.AddItem("i", "i1")[0].SetMetadataValue("p", "v1"); 1763project.AddItem("i", "i1"); 1765project.AddItem("i", "i2"); 1867ProjectItem item = project.AddItem("i", "i1")[0]; 1895ProjectItem item = project.AddItem("i", "i1")[0]; 1924ProjectItem item = project.AddItem("i", "i1")[0]; 1953IList<ProjectItem> items = project.AddItem("i", "a;b");
Definition\Project_Tests.cs (4)
1812project.AddItem("i", "i1"); 1826ProjectItem item1 = project.AddItem("i", "i1;j1")[0]; 2885project.AddItem("new", "new value"); 3873project.AddItem("foo", "bar");
Definition\ProjectItem_Tests.cs (12)
80ProjectItem item = project.AddItem("i", "i1")[0]; 787Should.Throw<InvalidProjectFileException>(() => { _ = project.AddItem("i", unevaluatedInclude); }); 839_ = project.AddItem("i", unevaluatedInclude); 1872ProjectItem item = project.AddItem("i", "i1")[0]; 1931ProjectItem item = project.AddItem("i", "i1")[0]; 1964ProjectItem item = project.AddItem("i", "i1")[0]; 1995project.AddItem("File", "*.cs"); 2022ProjectItem item = project.AddItem("i", "i1")[0]; 2040ProjectItem item = project.AddItem("i", "i1")[0]; 2060import.AddItem("i", "i1"); 2091import.AddItem("i", "i1"); 2122ProjectItem item = import.AddItem("i", "i1")[0];
Definition\ProjectMetadata_Tests.cs (6)
30ProjectItem item = project.AddItem("i", "i1")[0]; 90ProjectItem item = project.AddItem("i", "i1")[0]; 111ProjectItem item = project.AddItem("i", "i1")[0]; 128project.AddItem("i", "i1"); 129ProjectItem item = project.AddItem("j", "j1")[0]; 448ProjectMetadata metadata = project.AddItem("i", "i1")[0].SetMetadataValue("m", "m1");
ObjectModelRemoting\Helpers\ViewValidation.evaluation.cs (1)
55var added = (metadata == null) ? toAdd.AddItem(itemType, unevaluatedInclude) : toAdd.AddItem(itemType, unevaluatedInclude, metadata);
Microsoft.Build.Engine.UnitTests (11)
Definition\ItemDefinitionGroup_Tests.cs (2)
1266p.AddItem("i", "i1"); 1295p.AddItem("i", "i1");
Definition\ProjectEvaluationContext_Tests.cs (2)
217project.AddItem("a", "b"); 1011project.AddItem("a", "b");
EscapingInProjects_Tests.cs (4)
220project.AddItem("MyWildCard", "foo;bar.weirdo"); 265project.AddItem("MyWildCard", "$(FilenameWithSemicolon).weirdo"); 473IEnumerable<ProjectItem> newItems = project.AddItem("MyWildCard", "foo%253bbar.weirdo"); 515IEnumerable<ProjectItem> newItems = project.AddItem("MyWildCard", "foo.AAA%253bBBB");
Evaluation\Evaluator_Tests.cs (3)
1555ProjectItem item = project.AddItem("i", "i1")[0]; 2034project.AddItem("i", "i6"); 2035project.AddItem("i", "i7");
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
MSBuild\ProjectFile\ProjectFile.cs (1)
539_loadedProject.AddItem(ItemNames.Analyzer, relativePath);