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