22 writes to Include
Microsoft.Build (3)
Construction\ProjectRootElement.cs (1)
1275
item.
Include
= include;
Definition\ProjectItem.cs (1)
717
_xml.
Include
= name;
Instance\ProjectItemInstance.cs (1)
680
item.
Include
= EvaluatedInclude;
Microsoft.Build.Engine.OM.UnitTests (19)
Construction\ConstructionEditing_Tests.cs (7)
740
itemInclude.
Include
= "i";
1146
firstIncludeItem.
Include
= "a";
1147
secondIncludeItem.
Include
= "a";
2582
element.
Include
= "i2";
2832
element.
Include
= "i2";
2929
element.
Include
= "i2";
3091
element.
Include
= "i2";
Construction\ProjectItemElement_Tests.cs (8)
653
item.
Include
= "ib";
668
item.
Include
= String.Empty;
683
item.
Include
= null;
822
item.
Include
= "i1";
916
item.
Include
= "i1";
977
item.Xml.
Include
= "i2";
1008
item.
Include
= null;
1028
item.
Include
= null;
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (4)
648
item.VerifySetter("newInclude", (i) => i.Include, (i, v) => i.
Include
= v);
655
item.View.
Include
= null;
657
Assert.ThrowsAny<InvalidOperationException>(() => item.View.
Include
= "xx"); // Include/Update/Remove are exclusive
661
Assert.ThrowsAny<InvalidOperationException>(() => item.View.
Include
= "xx"); // Include/Update/Remove are exclusive
41 references to Include
Microsoft.Build (19)
Construction\ProjectItemElement.cs (5)
149
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (
Include
.Length == 0 && Update.Length == 0), "OM_OneOfAttributeButNotMore", ElementName, XMakeAttributes.include, XMakeAttributes.remove, XMakeAttributes.update);
168
ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Remove.Length == 0 &&
Include
.Length == 0), "OM_OneOfAttributeButNotMore", ElementName, XMakeAttributes.include, XMakeAttributes.remove, XMakeAttributes.update);
344
_includeHasWildcards = (
Include
!= null) && FileMatcher.HasWildcards(_include);
475
ErrorUtilities.VerifyThrowInvalidOperation(parent.Parent is ProjectTargetElement || (
Include
.Length > 0 || Update.Length > 0 || Remove.Length > 0), "OM_ItemsOutsideTargetMustHaveIncludeOrUpdateOrRemove");
500
return owner.CreateItemElement(ItemType,
Include
);
Construction\ProjectItemGroupElement.cs (1)
115
if (String.Compare(include, item.
Include
, StringComparison.OrdinalIgnoreCase) < 0)
Definition\Project.cs (10)
1701
var hasCharactersThatRequireSplitting = FileMatcher.HasWildcardsSemicolonItemOrPropertyReferences(itemElement.
Include
);
2597
if (!string.IsNullOrEmpty(itemElement.
Include
))
2619
var includeItemspec = new EvaluationItemSpec(itemElement.
Include
, _data.Expander, itemElement.IncludeLocation, itemElement.ContainingProject.DirectoryPath);
2806
ProvenanceResult result = SingleItemSpecProvenance(itemElement.
Include
, itemElement.IncludeLocation, Operation.Include);
3422
var hasCharactersThatRequireSplitting = FileMatcher.HasWildcardsSemicolonItemOrPropertyReferences(itemElement.
Include
);
3449
string evaluatedExistingInclude = _data.Expander.ExpandIntoStringLeaveEscaped(candidateExistingItemXml.
Include
, ExpanderOptions.ExpandProperties, candidateExistingItemXml.IncludeLocation);
3523
return renamedItemElement.
Include
;
3532
renamedItemElement.
Include
,
3540
return renamedItemElement.
Include
;
3892
if (itemToAddBefore == null && String.Compare(unevaluatedInclude, existingItemXml.
Include
, StringComparison.OrdinalIgnoreCase) < 0)
Definition\ProjectItem.cs (1)
191
return _xml.
Include
;
Evaluation\Evaluator.cs (1)
516
itemElement.
Include
,
Evaluation\LazyItemEvaluator.cs (1)
552
ProcessItemSpec(rootDirectory, itemElement.
Include
, itemElement.IncludeLocation, operationBuilder);
Microsoft.Build.Engine.OM.UnitTests (22)
Construction\ProjectItemElement_Tests.cs (6)
364
Assert.Equal("i", items[0].
Include
);
373
Assert.Equal("i", items[1].
Include
);
639
Assert.Equal("i1", item.
Include
);
655
Assert.Equal("ib", item.
Include
);
670
Assert.Equal(String.Empty, item.
Include
);
685
Assert.Equal(String.Empty, item.
Include
);
Construction\ProjectItemGroupElement_tests.cs (2)
71
Assert.Equal("i1", items[0].
Include
);
72
Assert.Equal("i2", items[1].
Include
);
Construction\ProjectRootElement_Tests.cs (2)
893
Assert.Equal("k1", items[2].
Include
);
894
Assert.Equal("k4", items[5].
Include
);
Definition\Project_Tests.cs (1)
1770
project.Xml.RawXml.ShouldNotContain(itemToRemove.Xml.
Include
);
Definition\ProjectItem_Tests.cs (1)
1972
Assert.Equal("i2", item.Xml.
Include
);
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (2)
894
Assert.Equal(realXml.
Include
, viewXml.
Include
);
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (8)
83
xmlPair.Add2NewChildrenWithVerify<ProjectItemElement>(newItem, (p, i) => p.AddItem("cpp", i), (pi, i) => pi.
Include
== i, out var item1, out var item2);
84
xmlPair.Add2NewChildrenWithVerify<ProjectItemElement>(newItemWithMetadata, (p, i) => p.AddItem("cpp", i, itemMetadata), (pi, i) => pi.
Include
== i, out var itemWithMetadata1, out var itemWithMetadata2);
351
var item1 = xmlPair.AddNewChaildWithVerify<ProjectItemElement>(ObjectType.View, "newItem", (p, i) => p.AddItem("cpp", i), (pi, i) => pi.
Include
== i);
644
var itemInTargt = itemGrp.AddNewChaildWithVerify<ProjectItemElement>(ObjectType.View, "targetfile.cs", (p, s) => p.AddItem("cs", s), (pe, s) => pe.
Include
== s);
646
var item = xmlPair.AddNewChaildWithVerify<ProjectItemElement>(ObjectType.View, "file.cpp", (p, s) => p.AddItem("cpp", s), (pe, s) => pe.
Include
== s);
648
item.VerifySetter("newInclude", (i) => i.
Include
, (i, v) => i.Include = v);
697
itemGrp.Add2NewChildrenWithVerify<ProjectItemElement>("file.cpp", (ig, inc) => ig.AddItem("cpp", inc), (i, inc) => i.
Include
== inc, out var item1, out var item2);
705
itemGrp.Add2NewChildrenWithVerify<ProjectItemElement>("file.cs", (ig, inc) => ig.AddItem("cs", inc, itemMetadata), (i, inc) => i.
Include
== inc, out var itemWithMetadata1, out var itemWithMetadata2);