70 references to AddImport
Microsoft.Build.Engine.OM.UnitTests (51)
Construction\ConstructionEditing_Tests.cs (2)
2515
ProjectImportElement import = project.
AddImport
("p");
2527
ProjectImportElement import = project.
AddImport
("p");
Construction\ProjectImportGroupElement_Tests.cs (3)
37
project.
AddImport
("b.proj");
77
project.
AddImport
("e.proj");
123
project.
AddImport
("d.proj");
Construction\ProjectRootElement_Tests.cs (1)
1199
pre.
AddImport
("direct import");
Definition\DefinitionEditing_Tests.cs (1)
1524
xml.
AddImport
(NativeMethodsShared.IsWindows ?
Definition\Project_Tests.cs (32)
325
xml.
AddImport
("__nonexistent__");
339
xml.
AddImport
(@"//MSBuildExtensionsPath32)\4.0\Microsoft.VisualStudioVersion.v11.Common.props");
369
xml.
AddImport
("__nonexistent__");
409
project.Xml.
AddImport
("$(MSBuildProjectFullPath)");
441
project.Xml.
AddImport
(file2);
445
project2.Xml.
AddImport
(file);
477
project.Xml.
AddImport
(file2);
478
project.Xml.
AddImport
(file2);
516
project.Xml.
AddImport
(file2);
517
project.Xml.
AddImport
(file3);
521
project.Xml.
AddImport
(file3);
1398
project.Xml.
AddImport
(path);
1461
project.Xml.
AddImport
(importFile);
1526
project.Xml.
AddImport
(importFile);
1544
newProject.Xml.
AddImport
(importFile);
2505
projectXml.
AddImport
(evaluatedInclude);
2558
zero.
AddImport
(one.FullPath);
2559
zero.
AddImport
(two.FullPath);
2560
zero.
AddImport
(two.FullPath); // Duplicated import: only the first one should be entered
2561
zero.
AddImport
(zero.FullPath); // Ignored self import
2565
one.
AddImport
(three.FullPath);
2569
one.
AddImport
(four.FullPath).Condition = "false"; // False condition; should not be entered
2615
zero.
AddImport
(Path.Combine(myTempDir, "*.targets"));
3901
var import = pre.
AddImport
(@"$(MSBuildExtensionsPath)\Foo");
3938
var import = pre.
AddImport
(@"Foo\*");
3982
var import = pre.
AddImport
(importFile.Path);
4029
var import = pre.
AddImport
(importFile.Path);
4069
var import = pre.
AddImport
("$(SomethingThatEvaluatesToEmpty)");
4112
var import = pre.
AddImport
(importPath);
4155
var import = pre.
AddImport
(importGlob);
4206
var import = pre2.
AddImport
(pre1.FullPath);
4269
project.Xml.
AddImport
(ImportValue);
Definition\ProjectItem_Tests.cs (3)
2064
xml.
AddImport
(file);
2095
xml.
AddImport
(file);
2127
xml.
AddImport
(file);
Definition\ProjectItemDefinition_Tests.cs (2)
132
main.
AddImport
(file);
162
main.
AddImport
(file);
Definition\ProjectMetadata_Tests.cs (1)
466
xml.
AddImport
("import");
Definition\ProjectProperty_Tests.cs (1)
271
xml.
AddImport
(file);
Instance\ProjectInstance_Tests.cs (3)
423
projB.
AddImport
("a.proj");
459
projB.
AddImport
("a.proj");
507
projB.
AddImport
("a.proj");
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (2)
79
xmlPair.Add2NewChildrenWithVerify<ProjectImportElement>(newImport, (p, i) => p.
AddImport
(i), (pi, i) => pi.Project == i, out var import1, out var import2);
584
var import = xmlPair.AddNewChaildWithVerify<ProjectImportElement>(ObjectType.View, "import", (p, s) => p.
AddImport
(s), (pe, s) => true);
Microsoft.Build.Engine.UnitTests (19)
Construction\ProjectImportElement_Tests.cs (1)
101
ProjectImportElement importElement = rootElement.
AddImport
("Sdk.props");
Evaluation\Evaluator_Tests.cs (5)
1153
project.Xml.
AddImport
(importPathRelativeEscaped);
1336
main.
AddImport
(targets1FileName);
1337
main.
AddImport
(targets2FileName);
1338
main.
AddImport
(targets3FileName);
5208
projectXml.
AddImport
(import);
Evaluation\Preprocessor_Tests.cs (13)
80
xml1.
AddImport
("p2");
124
xml1.
AddImport
("p2");
169
xml1.
AddImport
("p2");
212
xml1.
AddImport
("p2");
260
xml1.
AddImport
("p2").Condition = "false";
295
xml1.
AddImport
("p2");
542
xml1.
AddImport
("p2");
543
xml1.
AddImport
("p3");
604
xml1.
AddImport
("p2");
605
xml1.
AddImport
("p3");
711
xml0.
AddImport
(directory + Path.DirectorySeparatorChar + "*.targets");
1235
xml1.
AddImport
("$(Import)");
1236
xml2.
AddImport
("$(Import)");