232 references to Xml
Microsoft.Build (27)
Definition\Project.cs (19)
481
projectCollection.TryUnloadProject(
Xml
);
734
/// The actual tools version on the Project tag, can be gotten from <see cref="
Xml
">Xml.ToolsVersion</see>.
752
public string DirectoryPath =>
Xml
.DirectoryPath;
762
get =>
Xml
.FullPath;
764
set =>
Xml
.FullPath = value;
814
public ElementLocation ProjectFileLocation =>
Xml
.ProjectFileLocation;
1430
Xml
.Save();
1438
Xml
.Save(encoding);
1447
Xml
.Save(path);
1455
Xml
.Save(path, encoding);
1465
Xml
.Save(writer);
1809
ErrorUtilities.VerifyThrowInvalidOperation(ReferenceEquals(
Xml
, otherXml), "OM_CannotModifyEvaluatedObjectInImportedFile", otherXml.Location.File);
4287
RecordImport(null, Project.
Xml
, Project.
Xml
.Version, null);
4289
ElementLocation toolsVersionLocation = Project.
Xml
.ProjectFileLocation;
4291
if (Project.
Xml
.ToolsVersion.Length > 0)
4293
OriginalProjectToolsVersion = Project.
Xml
.ToolsVersion;
4294
toolsVersionLocation = Project.
Xml
.ToolsVersionLocation;
4299
Project.
Xml
.ToolsVersion,
Definition\ProjectItem.cs (1)
251
bool isImported = !Object.ReferenceEquals(_xml.ContainingProject, _project.
Xml
);
Definition\ProjectItemDefinition.cs (1)
173
ProjectItemDefinitionElement itemDefinition = _project.
Xml
.AddItemDefinition(_itemType);
Definition\ProjectMetadata.cs (1)
214
bool isImported = !Object.ReferenceEquals(_xml.ContainingProject, _parent.Project.
Xml
);
Definition\ProjectProperty.cs (2)
477
bool isImported = !Object.ReferenceEquals(_xml.ContainingProject, _project.
Xml
);
601
_project.
Xml
.AddProperty(_name, value);
Definition\ResolvedImport.cs (1)
46
IsImported = importingElement != null && !ReferenceEquals(project.
Xml
, importingElement.ContainingProject);
Evaluation\Preprocessor.cs (1)
90
XmlDocument outerDocument = _project.
Xml
.XmlDocument;
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (1)
24
/// Access to remote <see cref="Project.
Xml
"/>.
Microsoft.Build.Engine.OM.UnitTests (171)
Construction\ConstructionEditing_Tests.cs (1)
3234
p.
Xml
.AddProperty("propName", "propValue");
Construction\ElementLocationPublic_Tests.cs (2)
119
string locations = project.
Xml
.Location.LocationString + "\r\n";
123
foreach (var element in project.
Xml
.AllChildren)
Construction\ProjectChooseElement_Tests.cs (1)
276
ProjectChooseElement choose = Helpers.GetFirst(project.
Xml
.ChooseElements);
Construction\ProjectImportElement_Tests.cs (2)
180
ProjectImportElement import = Helpers.GetFirst(project.
Xml
.Imports);
219
ProjectImportElement import = Helpers.GetFirst(project.
Xml
.Imports);
Construction\ProjectRootElement_Tests.cs (1)
1066
var pre = projects[current].
Xml
;
Definition\DefinitionEditing_Tests.cs (81)
161
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
188
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
220
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
255
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
346
project.
Xml
.AddItem("i", "*.xxx");
370
project.
Xml
.AddItem("i", "*.xxx");
395
project.
Xml
.AddItem("i", "*.xxx");
420
ProjectItemElement itemElement = project.
Xml
.AddItem("i", "*.xxx");
446
ProjectItemElement itemElement = project.
Xml
.AddItem("i", "*.xxx");
471
ProjectItemElement item1 = project.
Xml
.AddItem("i", "*.xxx");
496
project.
Xml
.AddItem("i", "*.xxx");
522
ProjectItemElement item1 = project.
Xml
.AddItem(
558
ProjectItemElement item1 = project.
Xml
.AddItem("i", @"c:\subdir1\**\subdir2\**\*.x?x");
586
ProjectItemElement item1 = project.
Xml
.AddItem("i", "*.xxx");
614
project.
Xml
.AddItem("i", "*.xxx");
642
project.
Xml
.AddItem("i", "a;*.xxx;b");
673
ProjectItemElement itemElement = project.
Xml
.AddItem("i", wildcard);
695
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
739
Helpers.VerifyAssertProjectContent(expected, project.
Xml
, false);
775
Helpers.VerifyAssertProjectContent(expected, project.
Xml
, false);
794
ProjectItemElement itemElement = project.
Xml
.AddItem("i", wildcard);
813
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
831
project.
Xml
.AddItem("i", "a;*.$(p);b");
898
ProjectItemElement newItemElement = Helpers.GetFirst((Helpers.GetFirst(project.
Xml
.ItemGroups)).Items);
926
ProjectItemElement newItemElement = Helpers.GetLast((Helpers.GetLast(project.
Xml
.ItemGroups)).Items);
952
ProjectItemElement newItemElement = Helpers.GetLast((Helpers.GetLast(project.
Xml
.ItemGroups)).Items);
1020
Helpers.VerifyAssertProjectContent(expected, project.
Xml
, false);
1031
project.
Xml
.AddItem("i", "i1;i2;i3");
1046
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1060
project.
Xml
.AddItem("i", "i1;i2;i3");
1078
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1099
project.
Xml
.AddItem("i", wildcard);
1115
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1142
string before = project.
Xml
.RawXml;
1147
Helpers.VerifyAssertLineByLine(before, project.
Xml
.RawXml);
1186
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1188
ProjectItemGroupElement itemGroupElement = Helpers.GetFirst(project.
Xml
.ItemGroups);
1233
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1236
ProjectItemElement itemElement = Helpers.GetFirst(Helpers.GetFirst(project.
Xml
.ItemGroups).Items);
1256
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1266
project.
Xml
.AddItem("i", "i1;i2");
1280
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1282
ProjectItemGroupElement itemGroupElement = Helpers.GetFirst(project.
Xml
.ItemGroups);
1310
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1351
Helpers.VerifyAssertProjectContent(expected, project.
Xml
, false);
1362
project.
Xml
.AddItem("i", "i1;i2");
1374
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1394
ProjectItemElement itemElement = project.
Xml
.AddItem("i", wildcard);
1412
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1484
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1509
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1764
project.
Xml
.ItemGroups.First().Parent.RemoveAllChildren();
1767
Assert.Single(project.
Xml
.Items);
1786
Assert.Single(project.
Xml
.Properties);
1805
Assert.Single(project.
Xml
.Properties);
1828
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1856
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1880
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1908
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1938
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
1988
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
2028
Helpers.VerifyAssertProjectContent(expected, project.
Xml
, false);
2065
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
2085
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
2112
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
2144
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
2179
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
2267
project.
Xml
.AddItem("i", "*.xxx");
2291
project.
Xml
.AddItem("i", "*.xxx");
2316
project.
Xml
.AddItem("i", "*.xxx");
2341
ProjectItemElement itemElement = project.
Xml
.AddItem("i", "*.xxx");
2367
ProjectItemElement itemElement = project.
Xml
.AddItem("i", "*.xxx");
2392
ProjectItemElement item1 = project.
Xml
.AddItem("i", "*.xxx");
2417
project.
Xml
.AddItem("i", "*.xxx");
2443
ProjectItemElement item1 = project.
Xml
.AddItem("i",
2475
ProjectItemElement item1 = project.
Xml
.AddItem("i", @"c:\subdir1\**\subdir2\**\*.x?x");
2503
ProjectItemElement item1 = project.
Xml
.AddItem("i", "*.xxx");
2531
project.
Xml
.AddItem("i", "*.xxx");
2559
project.
Xml
.AddItem("i", "a;*.xxx;b");
2600
var initialXml = project.
Xml
.RawXml;
2607
Assert.Equal(initialXml, project.
Xml
.RawXml);
Definition\EditingElementsReferencedByOrReferences_Tests.cs (8)
46
Helpers.VerifyAssertProjectContent(expected, project.
Xml
, false);
81
Helpers.VerifyAssertProjectContent(expected, project.
Xml
, false);
110
Helpers.VerifyAssertProjectContent(expected, project.
Xml
, false);
161
Helpers.VerifyAssertProjectContent(expected, project.
Xml
, false);
207
Helpers.VerifyAssertProjectContent(expected, project.
Xml
, false);
261
Helpers.VerifyAssertProjectContent(expected, project.
Xml
, false);
299
Helpers.VerifyAssertProjectContent(expected, project.
Xml
, false);
333
Helpers.VerifyAssertProjectContent(expected, project.
Xml
, false);
Definition\Project_Tests.cs (44)
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);
859
ProjectPropertyElement propertyElement = project.
Xml
.AddProperty("p", "v0");
898
ProjectPropertyElement propertyElement = project.
Xml
.AddProperty("p1", "v0");
964
ProjectPropertyElement propertyElement = project.
Xml
.AddProperty("pp", "vv");
993
ProjectPropertyElement propertyElement = project.
Xml
.AddProperty("pp", "vv");
1029
ProjectPropertyElement propertyElement = project.
Xml
.AddProperty("p", "v0");
1090
project.
Xml
.ToolsVersion.ShouldBe(string.Empty);
1120
project.
Xml
.ToolsVersion = "2.0";
1129
project.
Xml
.ToolsVersion = "4.0";
1149
project.
Xml
.ToolsVersion = "2.0";
1154
project.
Xml
.ToolsVersion = ObjectModelHelpers.MSBuildDefaultToolsVersion;
1173
project.
Xml
.ToolsVersion = "2.0";
1182
project.
Xml
.ToolsVersion = "4.0";
1215
project.
Xml
.ToolsVersion = "bogus";
1217
project.
Xml
.ToolsVersion.ShouldBe("bogus");
1398
project.
Xml
.AddImport(path);
1461
project.
Xml
.AddImport(importFile);
1526
project.
Xml
.AddImport(importFile);
1544
newProject.
Xml
.AddImport(importFile);
1662
project.
Xml
.AddItem("i", "i1");
1663
project.
Xml
.AddItem("i", "i1");
1664
project.
Xml
.AddItem("j", "j1");
1665
project.
Xml
.AddItem("j", "i1");
1685
project.
Xml
.AddItem("i", "i%261");
1686
project.
Xml
.AddItem("j", "i%25261");
1687
project.
Xml
.AddItem("k", "j1");
1688
project.
Xml
.AddItem("l", "i&1");
1710
project.
Xml
.AddItem("i", "i1");
1770
project.
Xml
.RawXml.ShouldNotContain(itemToRemove.Xml.Include);
1771
project.
Xml
.RawXml.ShouldNotContain("*.foo");
1791
project.
Xml
.AddItem("i", "i1");
1797
project.
Xml
.AddItem("j", "i1");
2055
project.
Xml
.AddTarget("t");
2185
project.
Xml
.HasUnsavedChanges.ShouldBeTrue(); // Not dirty for saving
2202
project.
Xml
.HasUnsavedChanges.ShouldBeFalse(); // Not dirty for saving
4268
project.
Xml
.AddProperty(PropertyName, PropertyValue);
4269
project.
Xml
.AddImport(ImportValue);
Definition\ProjectCollection_Tests.cs (14)
350
Assert.True(ReferenceEquals(project1.
Xml
, project1b.
Xml
));
355
Assert.False(ReferenceEquals(project1.
Xml
, project2.
Xml
));
616
Helpers.ClearDirtyFlag(project1.
Xml
);
638
Helpers.ClearDirtyFlag(project1.
Xml
);
655
Helpers.ClearDirtyFlag(project1.
Xml
);
656
Helpers.ClearDirtyFlag(project2.
Xml
);
684
Helpers.ClearDirtyFlag(project1.
Xml
);
715
ProjectRootElement xml = project.
Xml
;
745
ProjectCollection.GlobalProjectCollection.UnloadProject(project.
Xml
);
760
ProjectRootElement importedXml = importProject.
Xml
;
763
mainProject.
Xml
.PrependChild(mainProject.
Xml
.CreateImportElement(importProject.FullPath));
Definition\ProjectItem_Tests.cs (2)
2228
Assert.Equal(2, project.
Xml
.AllChildren.OfType<ProjectItemElement>().Count());
2288
Assert.Equal(2, project.
Xml
.AllChildren.OfType<ProjectItemElement>().Count());
Definition\ProjectItemDefinition_Tests.cs (2)
50
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
180
Helpers.VerifyAssertProjectContent(expected, project.
Xml
);
ObjectModelRemoting\Helpers\TestCollectionGroup.cs (1)
265
linker.Collection.UnloadProject(p.
Xml
);
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (2)
211
public ProjectXmlPair(ProjectPair pair) : base(null, pair.View.
Xml
, pair.Real.
Xml
) { this.Project = pair; this.PRE = this; }
ObjectModelRemoting\Helpers\ViewValidation.evaluation.cs (2)
334
Verify(view.
Xml
, real.
Xml
);
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (1)
44
newReal.
Xml
.FullPath = tempPath;
ObjectModelRemoting\LinkedConstructionReadOnly_Tests.cs (3)
33
this.RealXml = projReal.
Xml
;
37
this.ViewXml = projView.
Xml
;
50
this.ViewXml = projView.
Xml
;
ObjectModelRemoting\LinkedSpecialCasesScenarios.cs (3)
81
newReal.
Xml
.FullPath = tempPath;
220
CloneAndAddInternal(this.StdGroup.LocalBig.
Xml
);
246
CopyFromInternal(this.StdGroup.LocalBig.
Xml
);
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectLink.cs (1)
28
public MockProjectElementLinkRemoter Xml => this.OwningCollection.ExportElement(this.Source.
Xml
);
Microsoft.Build.Engine.UnitTests (29)
ConsoleLogger_Tests.cs (1)
148
ProjectTargetElement target = project.
Xml
.AddTarget("T");
Definition\Project_Internal_Tests.cs (4)
134
project.
Xml
.ToolsVersion = "2.0";
139
project.
Xml
.ToolsVersion = "4.0";
185
project.
Xml
.ToolsVersion = "2.0";
190
project.
Xml
.ToolsVersion = ObjectModelHelpers.MSBuildDefaultToolsVersion;
Definition\ToolsVersion_Tests.cs (2)
793
ProjectInstance pi = new ProjectInstance(projectFromString.Project.
Xml
, null /* no global properties */, null /* don't explicitly set the toolsversion */, p);
903
ProjectInstance pi = new ProjectInstance(projectFromString.Project.
Xml
, null /* no global properties */, null /* don't explicitly set the toolsversion */, p);
EscapingInProjects_Tests.cs (7)
222
Helpers.CompareProjectXml(projectNewExpectedContents, project.
Xml
.RawXml);
267
Helpers.CompareProjectXml(projectNewExpectedContents, project.
Xml
.RawXml);
316
Helpers.CompareProjectXml(projectNewExpectedContents, project.
Xml
.RawXml);
372
Helpers.CompareProjectXml(projectNewExpectedContents, project.
Xml
.RawXml);
434
Helpers.CompareProjectXml(projectNewExpectedContents, project.
Xml
.RawXml);
475
Helpers.CompareProjectXml(projectNewExpectedContents, project.
Xml
.RawXml);
517
Helpers.CompareProjectXml(projectNewExpectedContents, project.
Xml
.RawXml);
Evaluation\Evaluator_Tests.cs (15)
1087
project.
Xml
.DefaultTargets = "dt";
1101
project.
Xml
.DefaultTargets = "dt2";
1153
project.
Xml
.AddImport(importPathRelativeEscaped);
1154
Console.WriteLine(project.
Xml
.RawXml);
1453
ProjectPropertyElement xml1 = project.
Xml
.Properties.First();
1532
ProjectMetadataElement xml1 = project.
Xml
.ItemDefinitions.ElementAt(0).Metadata.ElementAt(0);
1592
ProjectMetadataElement xml1 = project.
Xml
.ItemDefinitions.ElementAt(0).Metadata.ElementAt(0);
1595
ProjectMetadataElement xml2 = project.
Xml
.Items.ElementAt(0).Metadata.ElementAt(0);
1630
ProjectMetadataElement xml1 = project.
Xml
.Items.ElementAt(1).Metadata.ElementAt(0);
1662
ProjectMetadataElement xml1 = project.
Xml
.Items.ElementAt(0).Metadata.ElementAt(0);
1687
project.
Xml
.Items.First().Metadata.First();
1726
project.
Xml
.Items.First().Metadata.First();
1851
Assert.True(Object.ReferenceEquals(project.
Xml
, predecessor.Predecessor.Xml.ContainingProject));
3272
Assert.Equal("Foo;Goo", project.
Xml
.TreatAsLocalProperty);
3279
project.
Xml
.TreatAsLocalProperty = "Foo";
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (2)
TargetTests.cs (2)
929
proj.
Xml
.AddTarget("PrepareForBuild");
958
var task = proj.
Xml
.AddUsingTask(taskName, string.Empty, Assembly.GetExecutingAssembly().FullName);
Microsoft.Build.UnitTests.Shared (2)
ObjectModelHelpers.cs (2)
818
string newActualProjectContents = project.
Xml
.RawXml;
1587
VerifyAssertProjectContent(expected, project.
Xml
);
TaskUsageLogger (1)
TaskUsageLogger.cs (1)
225
GatherAndEvaluatedTasksInFile(p.
Xml
, p, usingTasks);