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