487 instantiations of Project
Microsoft.Build (7)
Construction\Solution\SolutionProjectGenerator.cs (1)
2143
Project msbuildProject = new
Project
(project.AbsolutePath, _globalProperties, childProjectToolsVersion);
Definition\Project.cs (3)
495
return new
Project
(
514
return new
Project
(
533
return new
Project
(
Definition\ProjectCollection.cs (2)
1215
project = new
Project
(fileName, globalProperties, effectiveToolsVersion, this);
1255
return new
Project
(xmlReader, globalProperties, toolsVersion, this);
ObjectModelRemoting\LinkedObjectFactory.cs (1)
102
return new
Project
(Collection, link);
Microsoft.Build.Engine.OM.UnitTests (345)
Construction\ConstructionEditing_Tests.cs (1)
3232
var p = new
Project
(testProject.ProjectFile);
Construction\ProjectFormatting_Tests.cs (19)
117
Project project = new
Project
(xml);
153
Project project = new
Project
(xml);
188
Project project = new
Project
(xml);
220
Project project = new
Project
(xml);
249
Project project = new
Project
(xml);
284
Project project = new
Project
(xml);
323
Project project = new
Project
(xml);
366
Project project = new
Project
(xml);
393
Project project = new
Project
(xml);
418
Project project = new
Project
(xml);
448
Project project = new
Project
(xml);
473
Project project = new
Project
(xml);
535
Project project = new
Project
();
560
Project project = new
Project
(NewProjectFileOptions.None);
581
Project project = new
Project
(NewProjectFileOptions.None);
603
Project project = new
Project
(NewProjectFileOptions.IncludeXmlNamespace);
626
Project project = new
Project
(NewProjectFileOptions.IncludeXmlDeclaration);
646
Project project = new
Project
(NewProjectFileOptions.None);
694
var project = new
Project
(ProjectRootElement.Open(file, ProjectCollection.GlobalProjectCollection));
Construction\ProjectImportElement_Tests.cs (1)
264
Project msbuildProject = new
Project
(projectfile);
Construction\ProjectItemElement_Tests.cs (3)
957
Project project = new
Project
();
973
Project project = new
Project
();
989
Project project = new
Project
();
Construction\ProjectMetadataElement_Tests.cs (12)
565
var project = new
Project
(projectElement);
608
var project = new
Project
(projectElement);
682
var project = new
Project
(projectElement);
725
var project = new
Project
(projectElement);
811
var project = new
Project
(projectElement);
874
var project = new
Project
(projectElement);
943
var project = new
Project
(projectElement);
986
var project = new
Project
(projectElement);
1058
var project = new
Project
(projectElement);
1098
var project = new
Project
(projectElement);
1169
var project = new
Project
(projectElement);
1216
var project = new
Project
(projectElement);
Construction\ProjectRootElement_Tests.cs (1)
1749
var project = new
Project
(rootElement, null, null, projectCollection);
Construction\WhiteSpacePreservation_Tests.cs (1)
473
var project = new
Project
(projectElement);
Definition\DefinitionEditing_Tests.cs (85)
150
Project project = new
Project
();
177
Project project = new
Project
();
204
Project project = new
Project
();
232
Project project = new
Project
();
244
Project project = new
Project
();
265
Project project = new
Project
();
289
Project project = new
Project
();
312
Project project = new
Project
();
328
Project project = new
Project
();
345
Project project = new
Project
();
369
Project project = new
Project
();
394
Project project = new
Project
();
419
Project project = new
Project
();
445
Project project = new
Project
();
470
Project project = new
Project
();
495
Project project = new
Project
();
521
Project project = new
Project
();
557
Project project = new
Project
();
585
Project project = new
Project
();
613
Project project = new
Project
();
641
Project project = new
Project
();
672
Project project = new
Project
();
793
Project project = new
Project
();
829
Project project = new
Project
();
856
Project project = new
Project
();
883
Project project = new
Project
();
910
Project project = new
Project
();
938
Project project = new
Project
();
970
Project project = new
Project
();
1030
Project project = new
Project
();
1058
Project project = new
Project
();
1098
Project project = new
Project
();
1138
Project project = new
Project
();
1169
Project project = new
Project
();
1209
Project project = new
Project
();
1265
Project project = new
Project
();
1302
Project project = new
Project
();
1361
Project project = new
Project
();
1393
Project project = new
Project
();
1472
Project project = new
Project
();
1497
Project project = new
Project
();
1527
Project project = new
Project
(xml);
1542
Project project = new
Project
();
1558
Project project = new
Project
();
1573
Project project = new
Project
();
1591
Project project = new
Project
();
1606
Project project = new
Project
();
1621
Project project = new
Project
();
1636
Project project = new
Project
();
1651
Project project = new
Project
();
1711
return new
Project
(projectFile);
1725
Project project = new
Project
();
1740
Project project = new
Project
();
1762
Project project = new
Project
();
1781
Project project = new
Project
();
1800
Project project = new
Project
();
1818
Project project = new
Project
();
1842
Project project = new
Project
();
1865
Project project = new
Project
();
1893
Project project = new
Project
();
1922
Project project = new
Project
();
1952
Project project = new
Project
();
1969
Project project = new
Project
();
2047
Project project = new
Project
(xml);
2074
Project project = new
Project
();
2101
Project project = new
Project
();
2128
Project project = new
Project
();
2156
Project project = new
Project
();
2168
Project project = new
Project
();
2189
Project project = new
Project
();
2213
Project project = new
Project
();
2236
Project project = new
Project
();
2252
Project project = new
Project
();
2266
Project project = new
Project
();
2290
Project project = new
Project
();
2315
Project project = new
Project
();
2340
Project project = new
Project
();
2366
Project project = new
Project
();
2391
Project project = new
Project
();
2416
Project project = new
Project
();
2442
Project project = new
Project
();
2474
Project project = new
Project
();
2502
Project project = new
Project
();
2530
Project project = new
Project
();
2558
Project project = new
Project
();
Definition\Project_Tests.cs (101)
110
Project project = new
Project
(xml);
138
Project project = new
Project
(xml, null, null, collection);
166
Project project = new
Project
(xml, null, null, collection);
189
Project project = new
Project
(file);
217
project = new
Project
(file);
229
project = new
Project
(file); // should not throw
260
Project project = new
Project
(reader);
294
Project project = new
Project
(reader);
311
Project project2 = new
Project
(reader);
327
Project project = new
Project
(xml);
341
Project project = new
Project
(xml);
354
tasks[i] = Task.Factory.StartNew(delegate () { new
Project
(); }); // Should not throw
373
Project project = new
Project
(xml, null, null, collection, ProjectLoadSettings.IgnoreMissingImports);
389
Project project = new
Project
(xml, null, null, new ProjectCollection(), ProjectLoadSettings.IgnoreMissingImports);
408
Project project = new
Project
(collection);
440
Project project = new
Project
(collection);
444
Project project2 = new
Project
(collection);
476
Project project = new
Project
(collection);
481
Project project2 = new
Project
(collection);
515
Project project = new
Project
(collection);
520
Project project2 = new
Project
(collection);
524
Project project3 = new
Project
(collection);
546
Project project = new
Project
(xml);
599
Project project = new
Project
(xml);
645
Project project = new
Project
(xml);
680
Project project = new
Project
(xml);
718
Project project = new
Project
(xml);
754
Project project = new
Project
(xml);
792
Project project = new
Project
(xml);
815
Project project = new
Project
(xml, globalProperties, null);
831
Project project = new
Project
(xml, globalProperties, null);
846
Project project = new
Project
(xml);
858
Project project = new
Project
();
877
Project project = new
Project
();
892
Project project = new
Project
();
919
Project project = new
Project
();
931
Project project = new
Project
();
950
Project project = new
Project
();
963
Project project = new
Project
(ProjectRootElement.Create(), initial, null);
992
Project project = new
Project
(collection);
1012
Project project = new
Project
();
1028
Project project = new
Project
();
1049
Project project = new
Project
();
1069
Project project = new
Project
(
1088
Project project = new
Project
(xml);
1101
Project project = new
Project
();
1119
Project project = new
Project
();
1148
Project project = new
Project
();
1172
Project project = new
Project
();
1200
Project project = new
Project
();
1213
Project project = new
Project
();
1233
Project p = new
Project
(GetSampleProjectRootElement(), null, ObjectModelHelpers.MSBuildDefaultToolsVersion, collection);
1263
Project p = new
Project
(GetSampleProjectRootElement(), null, ObjectModelHelpers.MSBuildDefaultToolsVersion, collection);
1291
Project p = new
Project
(GetSampleProjectRootElement(), globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, collection);
1323
Project p = new
Project
(GetSampleProjectRootElement(), globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", collection, ProjectLoadSettings.Default);
1341
Project project = new
Project
();
1366
Project project = new
Project
(path);
1371
project = new
Project
(path);
1395
Project project = new
Project
();
1460
Project project = new
Project
(projectCollection);
1525
var project = new
Project
(projectCollection);
1543
var newProject = new
Project
(projectCollection);
1609
var project = new
Project
(projectRootElement, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
1634
Project project = new
Project
();
1661
Project project = new
Project
();
1684
Project project = new
Project
();
1709
Project project = new
Project
();
1747
Project project = new
Project
(projectConstruction);
1790
Project project = new
Project
();
1811
Project project = new
Project
();
1825
Project project = new
Project
();
2054
Project project = new
Project
();
2074
Project project = new
Project
();
2143
Project project = new
Project
(xml);
2157
Project project = new
Project
(xml);
2171
Project project = new
Project
(xml);
2365
Project project = new
Project
();
2382
Project project1 = new
Project
(root1);
2383
Project project2 = new
Project
(root2);
2423
Project project = new
Project
(globalProperties, null, new ProjectCollection());
2508
Project project = new
Project
(projectPath);
2571
Project project = new
Project
(zero);
2617
Project project = new
Project
(zero);
2655
Project project = new
Project
(XmlReader.Create(new StringReader(projectOriginalContents)));
2703
Project project = new
Project
(XmlReader.Create(new StringReader(projectOriginalContents)));
3254
var project = new
Project
(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
3284
var project = new
Project
(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
3575
var project = new
Project
(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
3770
var project = new
Project
(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
3845
var globResult = new
Project
(testFiles.ProjectFile, null, MSBuildConstants.CurrentToolsVersion, projectCollection).GetAllGlobs();
3864
var project = new
Project
(null, null, projectCollection);
3907
Project unused = new
Project
(pre, null, null, collection);
3948
Project unused = new
Project
(pre, null, null, collection);
3992
Project unused = new
Project
(pre, null, null, collection, ProjectLoadSettings.IgnoreEmptyImports);
4039
Project unused = new
Project
(pre, null, null, collection, ProjectLoadSettings.IgnoreInvalidImports);
4079
Project unused = new
Project
(pre, null, null, collection, ProjectLoadSettings.IgnoreInvalidImports);
4122
Project unused = new
Project
(pre, null, null, collection, ProjectLoadSettings.IgnoreMissingImports);
4165
Project unused = new
Project
(pre, null, null, collection);
4211
Project unused = new
Project
(pre2, null, null, collection);
4242
Project project = new
Project
(projectXml);
4267
Project project = new
Project
(collection);
Definition\ProjectCollection_Tests.cs (34)
70
Project project = new
Project
(path);
95
Project project = new
Project
();
125
Project project = new
Project
(collection);
149
var project = new
Project
{ FullPath = "c:\\x" };
284
var project = new
Project
(collection);
323
var project1 = new
Project
{ FullPath = "c:\\1" };
326
var project2 = new
Project
(collection) { FullPath = "c:\\1" };
372
_ = new
Project
{ FullPath = "c:\\x" };
375
_ = new
Project
{ FullPath = "c:\\x" };
386
var project = new
Project
{ FullPath = "c:\\1" };
413
new
Project
(xml, globalProperties1, ObjectModelHelpers.MSBuildDefaultToolsVersion)
420
new
Project
(xml, globalProperties2, ObjectModelHelpers.MSBuildDefaultToolsVersion)
443
var project = new
Project
{ FullPath = "c:\\1" };
510
var project1 = new
Project
(xml, null, "2.0") { FullPath = "c:\\1" };
512
var project2 = new
Project
(xml, null, ObjectModelHelpers.MSBuildDefaultToolsVersion) { FullPath = "c:\\1" };
569
var project = new
Project
(collection) { FullPath = "c:\\x" };
586
var project1 = new
Project
(collection) { FullPath = "c:\\y" };
596
var project2 = new
Project
(collection) { FullPath = "c:\\x" };
613
var project1 = new
Project
(collection) { FullPath = "c:\\y" };
635
var project1 = new
Project
(collection) { FullPath = "c:\\y" };
645
var project2 = new
Project
(collection) { FullPath = "c:\\x" };
682
var project1 = new
Project
(collection) { FullPath = "c:\\y" };
698
var project = new
Project
{ FullPath = "c:\\x" };
714
var project = new
Project
{ FullPath = "c:\\x" };
742
var project = new
Project
{ FullPath = "c:\\x" };
757
var mainProject = new
Project
{ FullPath = "c:\\main" };
759
var importProject = new
Project
{ FullPath = "c:\\import" };
788
var project = new
Project
{ FullPath = "c:\\x" };
807
var project = new
Project
{ FullPath = "c:\\1" };
835
Project project = new
Project
();
874
var project = new
Project
();
917
var project = new
Project
();
1375
var project = new
Project
(pre);
1404
project = new
Project
(pre, null, null, collection);
Definition\ProjectItem_Tests.cs (26)
79
Project project = new
Project
();
784
Project project = new
Project
();
836
Project project = new
Project
(projectCollection);
1115
ObjectModelHelpers.AssertItems(expectedInclude, new
Project
(projectFile).Items.ToList());
1155
ObjectModelHelpers.AssertItems(expectedInclude, new
Project
(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection).Items.ToList());
1175
ObjectModelHelpers.AssertItems(expectedInclude, new
Project
(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection).Items.ToList());
1871
Project project = new
Project
();
1894
Project project = new
Project
(xml);
1918
Project project = new
Project
(xml);
1930
Project project = new
Project
();
1950
Project project = new
Project
(xml);
1963
Project project = new
Project
();
1994
var project = new
Project
();
2021
Project project = new
Project
();
2039
Project project = new
Project
();
2059
Project import = new
Project
();
2065
Project project = new
Project
(xml);
2090
Project import = new
Project
();
2096
Project project = new
Project
(xml);
2121
Project import = new
Project
();
2128
Project project = new
Project
(xml);
2216
var project = new
Project
(testProject.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, env.CreateProjectCollection().Collection);
2276
var project = new
Project
(testProject.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, env.CreateProjectCollection().Collection);
3660
return new
Project
(p, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, c)
3710
itemsFromFragmentWithGlobs = Helpers.MakeList(new
Project
(testProject.ProjectFile).GetItems("i"));
3756
var project = new
Project
(testFiles.ProjectFile, new Dictionary<string, string>(), null, projectCollection);
Definition\ProjectItemDefinition_Tests.cs (14)
35
Project project = new
Project
(xml);
64
Project project = new
Project
(xml);
81
Project project = new
Project
(xml);
102
Project project = new
Project
(xml);
131
Project project = new
Project
(main);
161
Project project = new
Project
(main);
485
Project project = new
Project
(XmlReader.Create(new StringReader(content)));
507
Project project = new
Project
(XmlReader.Create(new StringReader(content)));
529
Project project = new
Project
(XmlReader.Create(new StringReader(content)));
551
Project project = new
Project
(XmlReader.Create(new StringReader(content)));
573
Project project = new
Project
(XmlReader.Create(new StringReader(content)));
595
Project project = new
Project
(XmlReader.Create(new StringReader(content)));
617
Project project = new
Project
(XmlReader.Create(new StringReader(content)));
639
Project project = new
Project
(XmlReader.Create(new StringReader(content)));
Definition\ProjectMetadata_Tests.cs (8)
29
Project project = new
Project
();
56
Project project = new
Project
(projectXml);
89
Project project = new
Project
();
109
Project project = new
Project
();
127
Project project = new
Project
();
447
Project project = new
Project
();
467
Project project = new
Project
(xml);
505
Microsoft.Build.Evaluation.Project project = new Microsoft.Build.Evaluation.
Project
();
Definition\ProjectProperty_Tests.cs (14)
29
Project project = new
Project
();
86
Project project = new
Project
();
103
Project project = new
Project
();
121
Project project = new
Project
();
138
Project project = new
Project
();
154
Project project = new
Project
();
177
Project project = new
Project
();
194
Project project = new
Project
(globalProperties, null, ProjectCollection.GlobalProjectCollection);
208
Project project = new
Project
();
224
Project project = new
Project
();
243
Project project = new
Project
();
266
Project import = new
Project
();
272
Project project = new
Project
(xml);
291
Project project = new
Project
(projectXml);
Instance\ProjectInstance_Tests.cs (8)
40
Project p = new
Project
();
204
Project p = new
Project
(ProjectRootElement.Create(), globals, null);
398
ProjectInstance instance1 = new
Project
().CreateProjectInstance();
404
new
Project
().CreateProjectInstance();
427
var projBEval = new
Project
(projB, null, null, pc);
469
var projBEval = new
Project
(projB, null, null, pc, loadSettings);
511
var projBEval = new
Project
(projB, null, null, pc);
1043
Project project = new
Project
(xml);
Instance\ProjectItemInstance_Tests.cs (3)
251
Project project = new
Project
();
346
Project project = new
Project
();
1193
Project project = new
Project
();
Instance\ProjectMetadataInstance_Tests.cs (1)
34
Project project = new
Project
();
Instance\ProjectOnErrorInstance_Tests.cs (1)
47
Project project = new
Project
(xml);
Instance\ProjectPropertyInstance_Tests.cs (2)
91
var project = new
Project
();
103
Project project = new
Project
();
Instance\ProjectTargetInstance_Tests.cs (5)
56
Project project = new
Project
(projectXml);
76
Project project = new
Project
(projectXml);
96
Project project = new
Project
(projectXml);
121
Project project = new
Project
(projectXml);
147
Project project = new
Project
(xml);
Instance\ProjectTaskInstance_Tests.cs (1)
77
Project project = new
Project
(xml);
Instance\ProjectTaskOutputItemInstance_Tests.cs (1)
50
Project project = new
Project
(xml);
Instance\ProjectTaskOutputPropertyInstance_Tests.cs (1)
50
Project project = new
Project
(xml);
ObjectModelRemoting\RemoteProjectsProviderMock\ExporterMock.cs (2)
167
public Project LoadProjectWithSettings(string path, ProjectLoadSettings settings) => new
Project
(path, null, null, this.Collection, settings);
175
Project project = new
Project
(xml, null, null, this.Collection, settings);
Microsoft.Build.Engine.UnitTests (123)
BackEnd\BuildManager_Tests.cs (11)
2265
var project = new
Project
(fileName);
2316
Project project = new
Project
(fileName);
3121
var project1 = new
Project
(projectPath1);
3126
var project2 = new
Project
(projectPath2);
3189
var project1 = new
Project
(projectPath1);
3204
var project2 = new
Project
(projectPath2);
3274
var project1 = new
Project
(projectPath1);
3289
var project2 = new
Project
(projectPath2);
3706
var mainProject = new
Project
(mainRootElement, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, collection);
3730
var p2pProject = new
Project
(p2pProjectPath, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, collection);
3857
var project = new
Project
(root, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion,
BackEnd\IntrinsicTask_Tests.cs (1)
3988
var project = new
Project
(p, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, c);
BackEnd\LoggingServicesLogMethod_Tests.cs (1)
471
Project msbuildProject = new
Project
(projectFile);
BackEnd\MSBuild_Tests.cs (2)
1849
Project project = new
Project
(projectFile2);
1885
Project project = new
Project
(projectFile2);
BackEnd\OnError_Tests.cs (1)
559
Project p = new
Project
(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
BackEnd\TargetUpToDateChecker_Tests.cs (1)
608
Project project = new
Project
(projectFile);
Collections\OMcollections_tests.cs (2)
311
Project project = new
Project
();
323
Project project = new
Project
();
ConsoleLogger_Tests.cs (1)
146
Microsoft.Build.Evaluation.Project project = new Microsoft.Build.Evaluation.
Project
();
Construction\SolutionProjectGenerator_Tests.cs (6)
311
Project project = new
Project
(projectXml);
852
Project msbuildProject = new
Project
(projectXml);
1058
var automaticProject = new
Project
(automaticProjectFile);
1105
Project msbuildProject = new
Project
(projectXml);
1175
Project msbuildProject = new
Project
(projectXml);
1220
Project msbuildProject = new
Project
(projectXml);
Construction\XmlReaderWithoutLocation_Tests.cs (1)
163
Project project = new
Project
(noLineInfoReader);
Definition\ItemDefinitionGroup_Tests.cs (7)
165
Project p = new
Project
(XmlReader.Create(new StringReader(
194
Project p = new
Project
(XmlReader.Create(new StringReader(
222
Project p = new
Project
(XmlReader.Create(new StringReader(
816
Project p = new
Project
(XmlReader.Create(new StringReader(@"
835
Project p = new
Project
(XmlReader.Create(new StringReader(@"
851
Project p = new
Project
(XmlReader.Create(new StringReader(@"
1062
Project p = new
Project
(XmlReader.Create(new StringReader(@"
Definition\Project_Internal_Tests.cs (2)
133
Project project = new
Project
();
184
Project project = new
Project
();
Definition\ProjectItem_Tests.cs (1)
83
Project project = new
Project
(projectXml);
EscapingInProjects_Tests.cs (5)
650
Project project = new
Project
(projectElement, null, null, collection);
833
Project project = new
Project
(reader);
845
Project project = new
Project
();
879
Project project = new
Project
(reader);
911
Project project = new
Project
(reader);
Evaluation\EvaluationLogging_Tests.cs (1)
88
var project = new
Project
(projectFile, null, null, collection);
Evaluation\Evaluator_Tests.cs (39)
90
Project project =
new
(projectFile.Path);
320
Project project = new
Project
(subdirProjPath);
957
Project project = new
Project
(content.ProjectFile, null, null);
1071
Project project = new
Project
(XmlReader.Create(new StringReader(manifest)), null, null, pc, ProjectLoadSettings.RejectCircularImports);
1086
Project project = new
Project
();
1151
Project project = new
Project
();
1358
Project project = new
Project
(main);
2213
Project project = new
Project
();
2442
Project project = new
Project
(collection);
2476
Project project = new
Project
(collection);
2494
Project project = new
Project
(collection);
2552
Project project = new
Project
(collection);
2571
Project project = new
Project
(collection);
2627
Project project = new
Project
(collection);
2646
Project project = new
Project
(collection);
2666
Project project = new
Project
();
2684
Project project = new
Project
(collection);
2703
Project project = new
Project
(collection);
2715
Project project = new
Project
(xml);
2732
Project project = new
Project
(xml);
2767
Project project = new
Project
(xml);
2786
Project project = new
Project
(xml);
2804
Project project = new
Project
(xml);
2822
Project project = new
Project
(xml);
3139
Project project = new
Project
(XmlReader.Create(new StringReader(content)), globalProperties, null);
3407
Project project = new
Project
(primaryProject, globalProperties, null);
3468
Project project = new
Project
(primaryProject, globalProperties, null);
3528
Project project = new
Project
(primaryProject, globalProperties, null);
3602
Project project = new
Project
(primaryProject, globalProperties, null);
3675
Project project = new
Project
(primaryProject, globalProperties, null);
3738
Project project = new
Project
(primaryProject, globalProperties, null);
3800
Project project = new
Project
(primaryProject, globalProperties, null);
4334
Project project = new
Project
(null, ObjectModelHelpers.MSBuildDefaultToolsVersion, collection);
4380
Project project = new
Project
(projectFilename);
4537
Project unused = new
Project
(primaryProject, null, null);
4638
Project project = new
Project
(primaryProject.ProjectFile, null, null);
4668
Project project = new
Project
(primaryProject.ProjectFile, null, null);
4987
new
Project
(XmlReader.Create(new StringReader(projectContents)), null, "Fake", fakeProjectCollection));
5216
Project project = new
Project
(projectXml);
Evaluation\ItemEvaluation_Tests.cs (2)
598
var project = new
Project
(projectFiles.ProjectFile);
659
Project project = Should.NotThrow(() => new
Project
(projectFiles.ProjectFile));
Evaluation\Preprocessor_Tests.cs (17)
55
Project project = new
Project
();
84
Project project = new
Project
(xml1);
128
Project project = new
Project
(xml1);
172
Project project = new
Project
(xml1);
216
Project project = new
Project
(xml1);
264
Project project = new
Project
(xml1);
298
Project project = new
Project
(xml1);
368
project = new
Project
(xr);
419
Project project = new
Project
(xml1);
477
Project project = new
Project
(xml1);
550
Project project = new
Project
(xml1);
611
Project project = new
Project
(xml1);
671
Project project = new
Project
(xml1);
725
Project project = new
Project
(xml0);
792
Project project = new
Project
();
826
Project project = new
Project
(xml);
1238
Project project = new
Project
(xml1);
Evaluation\ProjectSdkImplicitImport_Tests.cs (10)
112
var project = new
Project
(projectRootElement);
135
var project = new
Project
(projectRootElement);
202
Project project = new
Project
(projectRootElement);
305
Project project = new
Project
(ProjectRootElement.Create(XmlReader.Create(new StringReader(content))));
329
() => new
Project
(ProjectRootElement.Create(XmlReader.Create(new StringReader(content)))));
334
var project = new
Project
(projectRootElementFromString.Project);
396
Assert.Throws<InvalidProjectFileException>(() => new
Project
(
421
Project project = new
Project
(ProjectRootElement.Create(XmlReader.Create(new StringReader(content))));
445
var project = new
Project
(projectRootElement);
480
Project project = new
Project
(rootElement,
Graph\ProjectGraph_Tests.cs (2)
134
var projectInstance = new
Project
().CreateProjectInstance();
181
var projectInstance = new
Project
().CreateProjectInstance();
Instance\ProjectInstance_Internal_Tests.cs (4)
71
ProjectInstance project = new
Project
(projectRootElementFromString.Project).CreateProjectInstance();
119
ProjectInstance project = new
Project
(projectRootElementFromString.Project).CreateProjectInstance();
721
(f, xml, c) => new
Project
(f, null, null, c).CreateProjectInstance()
867
: new
Project
(rootElement, globalProperties: null, toolsVersion: null, projectCollection, projectLoadSettings).CreateProjectInstance();
Instance\ProjectMetadataInstance_Internal_Tests.cs (1)
56
Project project = new
Project
();
Instance\ProjectPropertyInstance_Internal_Tests.cs (1)
94
Project project = new
Project
();
Instance\TaskItem_Tests.cs (4)
213
Project project =
new
();
280
Project project = new
Project
(xml);
334
Project project = new
Project
(xml);
369
Project project = new
Project
(xml);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
TargetTests.cs (1)
926
Project proj = new
Project
(reader);
Microsoft.Build.Tasks.UnitTests (4)
AssignLinkMetadata_Tests.cs (1)
178
Project p = new
Project
(collection)
MSBuild_Tests.cs (3)
1387
Project project = new
Project
(projectFile2);
1473
Project project = new
Project
(projectFile2);
1509
Project project = new
Project
(projectFile1);
Microsoft.Build.UnitTests.Shared (6)
EngineTestEnvironment.cs (1)
218
Project project = new
Project
(ProjectFile, globalProperties, toolsVersion, projectCollection);
ObjectModelHelpers.cs (4)
125
return new
Project
(p, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, c)
732
Project project = new
Project
(
988
Project project = new
Project
(projectFileFullPath, null, null, projectCollection);
1103
Project project = new
Project
(projectXml);
ProjectFromString.cs (1)
39
Project =
new
(_reader, globalProperties, toolsVersion, subToolsetVersion, projectCollection, loadSettings);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Build\ProjectBuildManager.cs (1)
113
var project = new MSB.Evaluation.
Project
(
1364 references to Project
dotnet-openapi (6)
Commands\BaseCommand.cs (3)
125
protected static
Project
LoadProject(FileInfo projectFile)
127
var
project = ProjectCollection.GlobalProjectCollection.LoadProject(
154
var
project = LoadProject(projectFile);
Commands\RefreshCommand.cs (1)
41
var
project = LoadProject(projectFile);
Commands\RemoveCommand.cs (1)
53
var
project = LoadProject(projectFile);
ProjectExtensions.cs (1)
12
public static void AddElementWithAttributes(this
Project
project, string tagName, string include, IDictionary<string, string> metadata)
Microsoft.Build (189)
BackEnd\BuildManager\BuildManager.cs (2)
849
public ProjectInstance GetProjectInstanceForBuild(
Project
project)
1519
private BuildRequestConfiguration CreateConfiguration(
Project
project, BuildRequestConfiguration? existingConfiguration)
BackEnd\Shared\ConfigurationMetadata.cs (1)
36
public ConfigurationMetadata(
Project
project)
Construction\ProjectRootElement.cs (5)
721
return Create(ProjectCollection.GlobalProjectCollection,
Project
.DefaultNewProjectTemplateOptions);
758
return Create(path, ProjectCollection.GlobalProjectCollection,
Project
.DefaultNewProjectTemplateOptions);
776
return Create(path, projectCollection,
Project
.DefaultNewProjectTemplateOptions);
1718
return new ProjectRootElement(projectRootElementCache,
Project
.DefaultNewProjectTemplateOptions);
1848
internal void MarkProjectDirty(
Project
project)
Construction\Solution\SolutionProjectGenerator.cs (2)
21
using Project = Microsoft.Build.Evaluation.
Project
;
2143
Project
msbuildProject = new Project(project.AbsolutePath, _globalProperties, childProjectToolsVersion);
Definition\Project.cs (14)
493
public static
Project
FromFile(string file, ProjectOptions options)
512
public static
Project
FromProjectRootElement(ProjectRootElement rootElement, ProjectOptions options)
531
public static
Project
FromXmlReader(XmlReader reader, ProjectOptions options)
825
/// <see cref="
Project
.ReevaluateIfNecessary()" />
1677
ErrorUtilities.VerifyThrowInvalidOperation(!ThrowInsteadOfSplittingItemElement, "OM_CannotSplitItemElementWhenSplittingIsDisabled", itemElement.Location, $"{nameof(
Project
)}.{nameof(ThrowInsteadOfSplittingItemElement)}");
1880
public ProjectImpl(
Project
owner, ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings)
1904
public ProjectImpl(
Project
owner, XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
1939
public ProjectImpl(
Project
owner, string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
1967
private
Project
Owner { get; }
3398
ErrorUtilities.VerifyThrowInvalidOperation(!ThrowInsteadOfSplittingItemElement, "OM_CannotSplitItemElementWhenSplittingIsDisabled", itemElement.Location, $"{nameof(
Project
)}.{nameof(ThrowInsteadOfSplittingItemElement)}");
4026
internal Data(
Project
project, PropertyDictionary<ProjectPropertyInstance> globalProperties, string explicitToolsVersion, string explicitSubToolsetVersion, bool CanEvaluateElementsWithFalseConditions)
4227
internal
Project
Project { get; }
4636
/// Data class representing a result from <see cref="
Project
.GetAllGlobs()"/> and its overloads.
4733
/// Data class representing a result from <see cref="
Project
.GetItemProvenance(string)"/> and its overloads.
Definition\ProjectCollection.cs (50)
187
/// Whether <see cref="
Project
.MarkDirty()">MarkDirty()</see> is temporarily disabled on
412
/// Raised when a <see cref="
Project
"/> contained by this instance is directly changed.
586
public ICollection<
Project
> LoadedProjects => GetLoadedProjects(true, null);
797
/// Whether <see cref="
Project
.MarkDirty()">MarkDirty()</see> is temporarily disabled on
1097
public ICollection<
Project
> GetLoadedProjects(string fullPath)
1107
internal ICollection<
Project
> GetLoadedProjects(bool includeExternal, string fullPath = null)
1109
List<
Project
> loaded;
1112
loaded = fullPath == null ? new List<
Project
>(_loadedProjects) : new List<
Project
>(_loadedProjects.GetMatchingProjectsIfAny(fullPath));
1133
public
Project
LoadProject(string fileName)
1145
public
Project
LoadProject(string fileName, string toolsVersion)
1158
public
Project
LoadProject(string fileName, IDictionary<string, string> globalProperties, string toolsVersion)
1209
Project
project = _loadedProjects.GetMatchingProjectIfAny(fileName, globalProperties, effectiveToolsVersion);
1228
public
Project
LoadProject(XmlReader xmlReader)
1240
public
Project
LoadProject(XmlReader xmlReader, string toolsVersion)
1253
public
Project
LoadProject(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion)
1340
public void UnloadProject(
Project
project)
1390
Project
conflictingProject = GetLoadedProjects(false, null).FirstOrDefault(project => project.UsesProjectRootElement(projectRootElement));
1408
foreach (
Project
project in _loadedProjects)
1453
var projects = new List<
Project
>(_loadedProjects);
1454
foreach (
Project
project in projects)
1480
var projects = new List<
Project
>(_loadedProjects);
1481
foreach (
Project
project in projects)
1527
/// Returns false if it was not unloaded because it was still in use by a loaded <see cref="
Project
"/>.
1542
Project
conflictingProject = GetLoadedProjects(false, null).FirstOrDefault(project => project.UsesProjectRootElement(projectRootElement));
1568
internal void OnAfterRenameLoadedProject(string oldFullPathIfAny,
Project
project)
1607
internal void AfterUpdateLoadedProjectGlobalProperties(
Project
project)
2429
private class LoadedProjectCollection : IEnumerable<
Project
>
2444
private Dictionary<string, List<
Project
>> _loadedProjects = new Dictionary<string, List<
Project
>>(StringComparer.OrdinalIgnoreCase);
2468
public IEnumerator<
Project
> GetEnumerator()
2472
var projects = new List<
Project
>();
2474
foreach (List<
Project
> projectList in _loadedProjects.Values)
2476
foreach (
Project
project in projectList)
2498
internal IList<
Project
> GetMatchingProjectsIfAny(string fullPath)
2502
_loadedProjects.TryGetValue(fullPath, out List<
Project
> candidates);
2504
return candidates ?? (IList<
Project
>)Array.Empty<
Project
>();
2513
internal
Project
GetMatchingProjectIfAny(string fullPath, IDictionary<string, string> globalProperties, string toolsVersion)
2517
if (_loadedProjects.TryGetValue(fullPath, out List<
Project
> candidates))
2519
foreach (
Project
candidate in candidates)
2536
internal void AddProject(
Project
project)
2540
if (!_loadedProjects.TryGetValue(project.FullPath, out List<
Project
> projectList))
2542
projectList = new List<
Project
>();
2546
foreach (
Project
existing in projectList)
2563
internal bool RemoveProject(
Project
project)
2572
internal bool RemoveProject(string projectFullPath,
Project
project)
2576
if (!_loadedProjects.TryGetValue(projectFullPath, out List<
Project
> projectList))
2604
_loadedProjects = new Dictionary<string, List<
Project
>>(StringComparer.OrdinalIgnoreCase);
2613
private static bool HasEquivalentGlobalPropertiesAndToolsVersion(
Project
project, IDictionary<string, string> globalProperties, string toolsVersion)
Definition\ProjectItem.cs (8)
38
private readonly
Project
_project;
110
internal ProjectItem(ProjectItemElement xml,
Project
project)
123
Project
project,
236
public
Project
Project
816
/// Called ONLY by <see cref="Microsoft.Build.Evaluation.
Project
.SplitItemElementIfNecessary(ProjectItemElement)"/>
911
private readonly
Project
_project;
923
internal ProjectItemFactory(
Project
project)
933
internal ProjectItemFactory(
Project
project, ProjectItemElement xml)
Definition\ProjectItemDefinition.cs (3)
36
private readonly
Project
_project;
56
internal ProjectItemDefinition(
Project
project, string itemType)
73
public
Project
Project
Definition\ProjectLoadSettings.cs (3)
53
/// By default, evaluations performed via <see cref="
Project
"/> evaluate and collect elements whose conditions were false (e.g. <see cref="
Project
.ItemsIgnoringCondition"/>).
54
/// This flag turns off this behaviour. <see cref="
Project
"/> members that collect such elements will throw when accessed.
Definition\ProjectMetadata.cs (1)
175
public
Project
Project
Definition\ProjectOptions.cs (1)
14
/// Common <see cref="
Project
" /> constructor arguments.
Definition\ProjectProperty.cs (11)
29
private readonly
Project
_project;
41
internal ProjectProperty(
Project
project)
50
internal ProjectProperty(
Project
project, string evaluatedValueEscaped)
194
public
Project
Project
279
internal static ProjectProperty Create(
Project
project, string name, string evaluatedValueEscaped, bool isGlobalProperty, bool mayBeReserved, LoggingContext loggingContext = null)
291
internal static ProjectProperty Create(
Project
project, ProjectPropertyElement xml, string evaluatedValueEscaped, ProjectProperty predecessor)
331
private static bool ProjectHasMatchingGlobalProperty(
Project
project, string propertyName)
359
internal ProjectPropertyXmlBacked(
Project
project, ProjectPropertyElement xml, string evaluatedValueEscaped)
504
internal ProjectPropertyXmlBackedWithPredecessor(
Project
project, ProjectPropertyElement xml, string evaluatedValueEscaped, ProjectProperty predecessor)
544
internal ProjectPropertyNotXmlBacked(
Project
project, string name, string evaluatedValueEscaped, bool isGlobalProperty, bool mayBeReserved)
678
Project
project, string name, string evaluatedValueEscaped, bool isGlobalProperty, bool mayBeReserved, LoggingContext loggingContext)
Definition\ResolvedImport.cs (1)
38
internal ResolvedImport(
Project
project, ProjectImportElement importingElement, ProjectRootElement importedProject, int versionEvaluated, SdkResult sdkResult)
Evaluation\Evaluator.cs (2)
199
Project
project,
299
Project
project,
Evaluation\IProjectMetadataParent.cs (1)
17
Project
Project
Evaluation\Preprocessor.cs (3)
32
private readonly
Project
_project;
58
private Preprocessor(
Project
project)
76
internal static XmlDocument GetPreprocessedDocument(
Project
project)
Evaluation\ProjectChangedEventArgs.cs (2)
20
internal ProjectChangedEventArgs(
Project
project)
31
public
Project
Project { get; private set; }
Evaluation\ProjectRootElementCacheBase.cs (1)
81
internal virtual void OnProjectDirtied(
Project
sender, ProjectChangedEventArgs e)
Evaluation\SimpleProjectRootElementCache.cs (1)
138
internal override void OnProjectDirtied(
Project
sender, ProjectChangedEventArgs e)
Graph\ProjectGraph.cs (2)
43
/// is provided as a hook to allow scenarios like creating a <see cref="
Project
" />
47
/// using <see cref="
Project
.CreateProjectInstance()" /> with the flag
Instance\ProjectInstance.cs (15)
366
/// Creates a ProjectInstance from an external created <see cref="
Project
"/>.
369
public ProjectInstance(
Project
project, ProjectInstanceSettings settings)
419
/// Creates a ProjectInstance from an immutable <see cref="
Project
"/>.
420
/// The resulting <see cref="ProjectInstance"/> object wraps the <see cref="
Project
"/>
424
/// <param name="linkedProject">The immutable <see cref="
Project
"/>.</param>
426
private ProjectInstance(
Project
linkedProject, bool fastItemLookupNeeded)
641
internal ProjectInstance(Evaluation.
Project
.Data data, string directory, string fullPath, HostServices hostServices, PropertyDictionary<ProjectPropertyInstance> environmentVariableProperties, ProjectInstanceSettings settings)
895
/// <param name="project">The immutable <see cref="
Project
"/> on which the ProjectInstance is based.</param>
897
public static ProjectInstance FromImmutableProjectSource(
Project
project, ProjectInstanceSettings settings)
903
private static IRetrievableEntryHashSet<ProjectItemDefinitionInstance> GetImmutableItemDefinitionsHashSetFromImmutableProject(
Project
linkedProject)
920
Project
linkedProject,
942
Project
linkedProject,
1006
private static PropertyDictionary<ProjectPropertyInstance> GetImmutablePropertyDictionaryFromImmutableProject(
Project
linkedProject)
1170
/// See <see cref="
Project
.LastEvaluationId"/>.
3379
Project
linkedProject,
ObjectModelRemoting\DefinitionObjectsLinks\ProjectItemDefinitionLink.cs (1)
20
public abstract
Project
Project { get; }
ObjectModelRemoting\DefinitionObjectsLinks\ProjectItemLink.cs (1)
21
public abstract
Project
Project { get; }
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (47)
19
/// Allow for creating a local representation to external object of type <see cref="
Project
"/>
24
/// Access to remote <see cref="
Project
.Xml"/>.
29
/// Access to remote <see cref="
Project
.ThrowInsteadOfSplittingItemElement"/>.
34
/// Access to remote <see cref="
Project
.IsDirty"/>.
39
/// Access to remote <see cref="
Project
.GlobalProperties"/>.
44
/// Access to remote <see cref="
Project
.ItemTypes"/>.
49
/// Access to remote <see cref="
Project
.Properties"/>.
54
/// Access to remote <see cref="
Project
.ConditionedProperties"/>.
59
/// Access to remote <see cref="
Project
.ItemDefinitions"/>.
64
/// Access to remote <see cref="
Project
.Items"/>.
69
/// Access to remote <see cref="
Project
.ItemsIgnoringCondition"/>.
74
/// Access to remote <see cref="
Project
.Imports"/>.
79
/// Access to remote <see cref="
Project
.ImportsIncludingDuplicates"/>.
84
/// Access to remote <see cref="
Project
.Targets"/>.
89
/// Access to remote <see cref="
Project
.AllEvaluatedProperties"/>.
94
/// Access to remote <see cref="
Project
.AllEvaluatedItemDefinitionMetadata "/>.
99
/// Access to remote <see cref="
Project
.AllEvaluatedItems "/>.
104
/// Access to remote <see cref="
Project
.ToolsVersion"/>.
109
/// Access to remote <see cref="
Project
.SubToolsetVersion"/>.
114
/// Access to remote <see cref="
Project
.SkipEvaluation"/>.
119
/// Access to remote <see cref="
Project
.DisableMarkDirty"/>.
124
/// Access to remote <see cref="
Project
.IsBuildEnabled"/>.
129
/// Access to remote <see cref="
Project
.LastEvaluationId"/>.
134
/// Facilitate remoting the <see cref="
Project
.GetAllGlobs(EvaluationContext)"/>.
139
/// Facilitate remoting the <see cref="
Project
.GetAllGlobs(string, EvaluationContext)"/>.
144
/// Facilitate remoting the <see cref="
Project
.GetItemProvenance(string, EvaluationContext)"/>.
149
/// Facilitate remoting the <see cref="
Project
.GetItemProvenance(string, string, EvaluationContext)"/>.
154
/// Facilitate remoting the <see cref="
Project
.GetItemProvenance(ProjectItem, EvaluationContext)"/>.
159
/// Facilitate remoting the <see cref="
Project
.GetLogicalProject"/>.
164
/// Facilitate remoting the <see cref="
Project
.GetProperty"/>.
169
/// Facilitate remoting the <see cref="
Project
.GetPropertyValue"/>.
174
/// Facilitate remoting the <see cref="
Project
.SetProperty"/>.
179
/// Facilitate remoting the <see cref="
Project
.SetGlobalProperty"/>.
184
/// Facilitate remoting the <see cref="
Project
.AddItem(string, string, IEnumerable{KeyValuePair{string, string}})"/>.
189
/// Facilitate remoting the <see cref="
Project
.AddItemFast(string, string, IEnumerable{KeyValuePair{string, string}})"/>.
194
/// Facilitate remoting the <see cref="
Project
.GetItems"/>.
199
/// Facilitate remoting the <see cref="
Project
.GetItemsIgnoringCondition"/>.
204
/// Facilitate remoting the <see cref="
Project
.GetItemsByEvaluatedInclude"/>.
209
/// Facilitate remoting the <see cref="
Project
.RemoveProperty"/>.
214
/// Facilitate remoting the <see cref="
Project
.RemoveGlobalProperty"/>.
219
/// Facilitate remoting the <see cref="
Project
.RemoveItem"/>.
224
/// Facilitate remoting the <see cref="
Project
.RemoveItems"/>.
229
/// Facilitate remoting the <see cref="
Project
.ExpandString"/>.
234
/// Facilitate remoting the <see cref="
Project
.CreateProjectInstance(ProjectInstanceSettings, EvaluationContext)"/>.
239
/// Facilitate remoting the <see cref="
Project
.MarkDirty"/>.
244
/// Facilitate remoting the <see cref="
Project
.ReevaluateIfNecessary(EvaluationContext)"/>.
249
/// Facilitate remoting the <see cref="
Project
.SaveLogicalProject"/>.
ObjectModelRemoting\DefinitionObjectsLinks\ProjectPropertyLink.cs (1)
20
public abstract
Project
Project { get; }
ObjectModelRemoting\ExternalProjectsProvider.cs (1)
21
public abstract ICollection<
Project
> GetLoadedProjects(string filePath);
ObjectModelRemoting\LinkedObjectFactory.cs (9)
73
public static IReadOnlyCollection<
Project
> GetLocalProjects(ProjectCollection collection, string projectFile = null)
75
return (IReadOnlyCollection<
Project
>)collection.GetLoadedProjects(false, projectFile);
80
public ProjectItem Create(ProjectItemLink link,
Project
project = null, ProjectItemElement xml = null)
88
public ProjectItemDefinition Create(ProjectItemDefinitionLink link,
Project
project = null)
95
public
Project
Create(ProjectLink link)
112
public ProjectProperty Create(ProjectPropertyLink link,
Project
project = null)
245
internal LinkedProjectItem(ProjectItemElement xml,
Project
project, ProjectItemLink link)
269
internal LinkedProjectItemDefinition(ProjectItemDefinitionLink link,
Project
project, string itemType)
324
internal LinkedProjectProperty(
Project
project, ProjectPropertyLink link)
Microsoft.Build.Engine.OM.UnitTests (566)
Construction\ConstructionEditing_Tests.cs (3)
2324
Project
project = projectFromString.Project;
2352
Project
project = projectFromString.Project;
3232
var
p = new Project(testProject.ProjectFile);
Construction\ElementLocationPublic_Tests.cs (1)
117
var
project = ObjectModelHelpers.CreateInMemoryProject(content);
Construction\ProjectChooseElement_Tests.cs (1)
275
Project
project = projectFromString.Project;
Construction\ProjectFormatting_Tests.cs (19)
117
Project
project = new Project(xml);
153
Project
project = new Project(xml);
188
Project
project = new Project(xml);
220
Project
project = new Project(xml);
249
Project
project = new Project(xml);
284
Project
project = new Project(xml);
323
Project
project = new Project(xml);
366
Project
project = new Project(xml);
393
Project
project = new Project(xml);
418
Project
project = new Project(xml);
448
Project
project = new Project(xml);
473
Project
project = new Project(xml);
535
Project
project = new Project();
560
Project
project = new Project(NewProjectFileOptions.None);
581
Project
project = new Project(NewProjectFileOptions.None);
603
Project
project = new Project(NewProjectFileOptions.IncludeXmlNamespace);
626
Project
project = new Project(NewProjectFileOptions.IncludeXmlDeclaration);
646
Project
project = new Project(NewProjectFileOptions.None);
694
var
project = new Project(ProjectRootElement.Open(file, ProjectCollection.GlobalProjectCollection));
Construction\ProjectImportElement_Tests.cs (3)
179
Project
project = projectFromString.Project;
218
Project
project = projectFromString.Project;
264
Project
msbuildProject = new Project(projectfile);
Construction\ProjectItemElement_Tests.cs (3)
957
Project
project = new Project();
973
Project
project = new Project();
989
Project
project = new Project();
Construction\ProjectMetadataElement_Tests.cs (12)
565
var
project = new Project(projectElement);
608
var
project = new Project(projectElement);
682
var
project = new Project(projectElement);
725
var
project = new Project(projectElement);
811
var
project = new Project(projectElement);
874
var
project = new Project(projectElement);
943
var
project = new Project(projectElement);
986
var
project = new Project(projectElement);
1058
var
project = new Project(projectElement);
1098
var
project = new Project(projectElement);
1169
var
project = new Project(projectElement);
1216
var
project = new Project(projectElement);
Construction\ProjectRootElement_Tests.cs (3)
1025
Project
[] projects = new
Project
[iterations];
1749
var
project = new Project(rootElement, null, null, projectCollection);
Construction\WhiteSpacePreservation_Tests.cs (2)
446
Action<ProjectRootElement,
Project
> act)
473
var
project = new Project(projectElement);
Definition\DefinitionEditing_Tests.cs (94)
25
public delegate void SetupProject(
Project
p);
150
Project
project = new Project();
177
Project
project = new Project();
204
Project
project = new Project();
232
Project
project = new Project();
244
Project
project = new Project();
265
Project
project = new Project();
289
Project
project = new Project();
312
Project
project = new Project();
328
Project
project = new Project();
345
Project
project = new Project();
369
Project
project = new Project();
394
Project
project = new Project();
419
Project
project = new Project();
445
Project
project = new Project();
470
Project
project = new Project();
495
Project
project = new Project();
521
Project
project = new Project();
557
Project
project = new Project();
585
Project
project = new Project();
613
Project
project = new Project();
641
Project
project = new Project();
672
Project
project = new Project();
720
Project
project = projectFromString.Project;
760
Project
project = projectFromString.Project;
793
Project
project = new Project();
829
Project
project = new Project();
856
Project
project = new Project();
883
Project
project = new Project();
910
Project
project = new Project();
938
Project
project = new Project();
970
Project
project = new Project();
1000
Project
project = projectFromString.Project;
1030
Project
project = new Project();
1058
Project
project = new Project();
1098
Project
project = new Project();
1138
Project
project = new Project();
1169
Project
project = new Project();
1209
Project
project = new Project();
1265
Project
project = new Project();
1302
Project
project = new Project();
1335
Project
project = projectFromString.Project;
1361
Project
project = new Project();
1393
Project
project = new Project();
1435
Project
project = projectFromString.Project;
1472
Project
project = new Project();
1497
Project
project = new Project();
1527
Project
project = new Project(xml);
1542
Project
project = new Project();
1558
Project
project = new Project();
1573
Project
project = new Project();
1591
Project
project = new Project();
1606
Project
project = new Project();
1621
Project
project = new Project();
1636
Project
project = new Project();
1651
Project
project = new Project();
1725
Project
project = new Project();
1740
Project
project = new Project();
1762
Project
project = new Project();
1781
Project
project = new Project();
1800
Project
project = new Project();
1818
Project
project = new Project();
1842
Project
project = new Project();
1865
Project
project = new Project();
1893
Project
project = new Project();
1922
Project
project = new Project();
1952
Project
project = new Project();
1969
Project
project = new Project();
2009
Project
project = projectFromString.Project;
2047
Project
project = new Project(xml);
2074
Project
project = new Project();
2101
Project
project = new Project();
2128
Project
project = new Project();
2156
Project
project = new Project();
2168
Project
project = new Project();
2189
Project
project = new Project();
2213
Project
project = new Project();
2236
Project
project = new Project();
2252
Project
project = new Project();
2266
Project
project = new Project();
2290
Project
project = new Project();
2315
Project
project = new Project();
2340
Project
project = new Project();
2366
Project
project = new Project();
2391
Project
project = new Project();
2416
Project
project = new Project();
2442
Project
project = new Project();
2474
Project
project = new Project();
2502
Project
project = new Project();
2530
Project
project = new Project();
2558
Project
project = new Project();
2574
private static void AssertDisabledItemSplitting(string projectContents, int itemIndex, SetupProject setupProject, Action<
Project
, ProjectItem> itemOperation, string metadataToInsert = "", Func<string,
Project
> projectProvider = null)
2583
Project
project;
Definition\EditingElementsReferencedByOrReferences_Tests.cs (10)
27
Project
project = GetProject(
61
Project
project = GetProject(
90
Project
project = GetProject(
119
Project
project = GetProject(
170
Project
project = GetProject(
222
Project
project = GetProject(
276
Project
project = GetProject(
315
Project
project = GetProject(
341
private
Project
GetProject(string contents)
344
Project
project = projectFromString.Project;
Definition\Project_Tests.cs (119)
110
Project
project = new Project(xml);
138
Project
project = new Project(xml, null, null, collection);
166
Project
project = new Project(xml, null, null, collection);
189
Project
project = new Project(file);
214
Project
project = null;
260
Project
project = new Project(reader);
279
Project
project = (new ProjectCollection()).LoadProject(reader);
294
Project
project = new Project(reader);
311
Project
project2 = new Project(reader);
327
Project
project = new Project(xml);
341
Project
project = new Project(xml);
373
Project
project = new Project(xml, null, null, collection, ProjectLoadSettings.IgnoreMissingImports);
389
Project
project = new Project(xml, null, null, new ProjectCollection(), ProjectLoadSettings.IgnoreMissingImports);
408
Project
project = new Project(collection);
440
Project
project = new Project(collection);
444
Project
project2 = new Project(collection);
476
Project
project = new Project(collection);
481
Project
project2 = new Project(collection);
515
Project
project = new Project(collection);
520
Project
project2 = new Project(collection);
524
Project
project3 = new Project(collection);
546
Project
project = new Project(xml);
599
Project
project = new Project(xml);
645
Project
project = new Project(xml);
680
Project
project = new Project(xml);
718
Project
project = new Project(xml);
754
Project
project = new Project(xml);
792
Project
project = new Project(xml);
815
Project
project = new Project(xml, globalProperties, null);
831
Project
project = new Project(xml, globalProperties, null);
846
Project
project = new Project(xml);
858
Project
project = new Project();
877
Project
project = new Project();
892
Project
project = new Project();
919
Project
project = new Project();
931
Project
project = new Project();
950
Project
project = new Project();
963
Project
project = new Project(ProjectRootElement.Create(), initial, null);
992
Project
project = new Project(collection);
1012
Project
project = new Project();
1028
Project
project = new Project();
1049
Project
project = new Project();
1069
Project
project = new Project(
1088
Project
project = new Project(xml);
1101
Project
project = new Project();
1119
Project
project = new Project();
1148
Project
project = new Project();
1172
Project
project = new Project();
1200
Project
project = new Project();
1213
Project
project = new Project();
1233
Project
p = new Project(GetSampleProjectRootElement(), null, ObjectModelHelpers.MSBuildDefaultToolsVersion, collection);
1263
Project
p = new Project(GetSampleProjectRootElement(), null, ObjectModelHelpers.MSBuildDefaultToolsVersion, collection);
1291
Project
p = new Project(GetSampleProjectRootElement(), globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, collection);
1323
Project
p = new Project(GetSampleProjectRootElement(), globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", collection, ProjectLoadSettings.Default);
1341
Project
project = new Project();
1366
Project
project = new Project(path);
1395
Project
project = new Project();
1460
Project
project = new Project(projectCollection);
1500
Action<string, string, string,
Project
> assertContents = (p, i, m, project) =>
1525
var
project = new Project(projectCollection);
1543
var
newProject = new Project(projectCollection);
1586
Action<string, string, string,
Project
> assertContents = (p, i, m, project) =>
1609
var
project = new Project(projectRootElement, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
1634
Project
project = new Project();
1661
Project
project = new Project();
1684
Project
project = new Project();
1709
Project
project = new Project();
1747
Project
project = new Project(projectConstruction);
1790
Project
project = new Project();
1811
Project
project = new Project();
1825
Project
project = new Project();
1855
Project
project = projectFromString.Project;
1891
Project
project = projectFromString.Project;
1927
Project
project = projectFromString.Project;
1976
Project
project = projectFromString.Project;
2010
Project
project = projectFromString.Project;
2043
Project
project = projectFromString.Project;
2054
Project
project = new Project();
2074
Project
project = new Project();
2106
Project
project = projectFromString.Project;
2143
Project
project = new Project(xml);
2157
Project
project = new Project(xml);
2171
Project
project = new Project(xml);
2183
Project
project = projectFromString.Project;
2220
Project
project = projectFromString.Project;
2243
Project
project = projectFromString.Project;
2266
Project
project = projectFromString.Project;
2290
Project
project = projectFromString.Project;
2315
Project
project = projectFromString.Project;
2350
Project
project = projectFromString.Project;
2365
Project
project = new Project();
2382
Project
project1 = new Project(root1);
2383
Project
project2 = new Project(root2);
2403
Project
project = projectFromString.Project;
2423
Project
project = new Project(globalProperties, null, new ProjectCollection());
2508
Project
project = new Project(projectPath);
2571
Project
project = new Project(zero);
2617
Project
project = new Project(zero);
2655
Project
project = new Project(XmlReader.Create(new StringReader(projectOriginalContents)));
2703
Project
project = new Project(XmlReader.Create(new StringReader(projectOriginalContents)));
2878
var
project = ObjectModelHelpers.CreateInMemoryProject(projectContents);
3254
var
project = new Project(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
3284
var
project = new Project(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
3575
var
project = new Project(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
3770
var
project = new Project(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
3864
var
project = new Project(null, null, projectCollection);
3907
Project
unused = new Project(pre, null, null, collection);
3948
Project
unused = new Project(pre, null, null, collection);
3992
Project
unused = new Project(pre, null, null, collection, ProjectLoadSettings.IgnoreEmptyImports);
4039
Project
unused = new Project(pre, null, null, collection, ProjectLoadSettings.IgnoreInvalidImports);
4079
Project
unused = new Project(pre, null, null, collection, ProjectLoadSettings.IgnoreInvalidImports);
4122
Project
unused = new Project(pre, null, null, collection, ProjectLoadSettings.IgnoreMissingImports);
4165
Project
unused = new Project(pre, null, null, collection);
4211
Project
unused = new Project(pre2, null, null, collection);
4242
Project
project = new Project(projectXml);
4267
Project
project = new Project(collection);
4335
Project
p;
4343
private static void GetProjectAndItemAtPosition(string project, string itemValue, int position, out
Project
p, out ProjectItem item)
4418
private void VerifyContentOfSampleProject(
Project
project)
Definition\ProjectCollection_Tests.cs (57)
70
Project
project = new Project(path);
72
Project
project2 = ProjectCollection.GlobalProjectCollection.LoadProject(path);
95
Project
project = new Project();
101
Project
project2 = ProjectCollection.GlobalProjectCollection.LoadProject(path);
125
Project
project = new Project(collection);
130
Project
project2 = collection.LoadProject(path);
149
var
project = new Project { FullPath = "c:\\x" };
150
Project
project2 = ProjectCollection.GlobalProjectCollection.LoadProject("c:\\x");
168
Project
project = collection.LoadProject(path);
199
Project
project = collection.LoadProject(path, "4.0");
230
Project
project = collection.LoadProject(path, null, "4.0");
254
Project
project = collection.LoadProject(reader);
270
Project
project = collection.LoadProject(reader, ObjectModelHelpers.MSBuildDefaultToolsVersion);
284
var
project = new Project(collection);
323
var
project1 = new Project { FullPath = "c:\\1" };
326
var
project2 = new Project(collection) { FullPath = "c:\\1" };
347
Project
project1 = collection1.LoadProject(path);
348
Project
project1b = collection1.LoadProject(path);
353
Project
project2 = collection2.LoadProject(path);
386
var
project = new Project { FullPath = "c:\\1" };
412
var
project1 =
419
var
project2 =
428
List<
Project
> projects = Helpers.MakeList(ProjectCollection.GlobalProjectCollection.LoadedProjects);
443
var
project = new Project { FullPath = "c:\\1" };
458
Project
project2 = ProjectCollection.GlobalProjectCollection.LoadProject("c:\\1", project2Globals, null);
510
var
project1 = new Project(xml, null, "2.0") { FullPath = "c:\\1" };
512
var
project2 = new Project(xml, null, ObjectModelHelpers.MSBuildDefaultToolsVersion) { FullPath = "c:\\1" };
531
Project
project = projectFromString.Project;
534
Project
project2 = ProjectCollection.GlobalProjectCollection.LoadProject("c:\\123.proj", null, null);
553
Project
project = projectFromString.Project;
556
Project
project2 = ProjectCollection.GlobalProjectCollection.LoadProject("c:\\123.proj", null, null);
569
var
project = new Project(collection) { FullPath = "c:\\x" };
573
Project
newProject = collection.LoadProject("c:\\x", globalProperties, null);
586
var
project1 = new Project(collection) { FullPath = "c:\\y" };
596
var
project2 = new Project(collection) { FullPath = "c:\\x" };
613
var
project1 = new Project(collection) { FullPath = "c:\\y" };
635
var
project1 = new Project(collection) { FullPath = "c:\\y" };
645
var
project2 = new Project(collection) { FullPath = "c:\\x" };
682
var
project1 = new Project(collection) { FullPath = "c:\\y" };
698
var
project = new Project { FullPath = "c:\\x" };
714
var
project = new Project { FullPath = "c:\\x" };
742
var
project = new Project { FullPath = "c:\\x" };
757
var
mainProject = new Project { FullPath = "c:\\main" };
759
var
importProject = new Project { FullPath = "c:\\import" };
788
var
project = new Project { FullPath = "c:\\x" };
807
var
project = new Project { FullPath = "c:\\1" };
835
Project
project = new Project();
840
Project
project2 = collection.LoadProject(file1);
874
var
project = new Project();
880
Project
project2 = collection.LoadProject(file1);
883
Project
project3 = collection.LoadProject(file1);
917
var
project = new Project();
926
Project
project3 = collection.LoadProject(file1);
1159
Project
project = projectFromString.Project;
1268
Project
project = collection.LoadProject(reader, ObjectModelHelpers.MSBuildDefaultToolsVersion);
1375
var
project = new Project(pre);
1392
Project
project = null;
Definition\ProjectItem_Tests.cs (42)
79
Project
project = new Project();
162
Project
project = projectFromString.Project;
784
Project
project = new Project();
836
Project
project = new Project(projectCollection);
1197
Project
project = projectFromString.Project;
1240
Project
project = projectFromString.Project;
1291
Project
project = projectFromString.Project;
1361
Project
project = projectFromString.Project;
1459
Project
project = projectFromString.Project;
1871
Project
project = new Project();
1894
Project
project = new Project(xml);
1918
Project
project = new Project(xml);
1930
Project
project = new Project();
1950
Project
project = new Project(xml);
1963
Project
project = new Project();
1994
var
project = new Project();
2021
Project
project = new Project();
2039
Project
project = new Project();
2059
Project
import = new Project();
2065
Project
project = new Project(xml);
2090
Project
import = new Project();
2096
Project
project = new Project(xml);
2121
Project
import = new Project();
2128
Project
project = new Project(xml);
2157
var
project = ObjectModelHelpers.CreateInMemoryProject(env.CreateProjectCollection().Collection, projectContents);
2183
var
project = ObjectModelHelpers.CreateInMemoryProject(env.CreateProjectCollection().Collection, projectContents);
2216
var
project = new Project(testProject.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, env.CreateProjectCollection().Collection);
2276
var
project = new Project(testProject.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, env.CreateProjectCollection().Collection);
2383
var
project = ObjectModelHelpers.CreateInMemoryProject(projectContents);
2400
var
project = ObjectModelHelpers.CreateInMemoryProject(projectContents);
2421
var
project = ObjectModelHelpers.CreateInMemoryProject(content);
2448
var
project = ObjectModelHelpers.CreateInMemoryProject(content);
2480
var
project = ObjectModelHelpers.CreateInMemoryProject(content);
2525
var
project = ObjectModelHelpers.CreateInMemoryProject(content);
2556
var
project = ObjectModelHelpers.CreateInMemoryProject(env.CreateProjectCollection().Collection, content);
2593
var
project = ObjectModelHelpers.CreateInMemoryProject(env.CreateProjectCollection().Collection, content);
2624
var
project = ObjectModelHelpers.CreateInMemoryProject(content);
2655
Project
project = ObjectModelHelpers.CreateInMemoryProject(content);
2684
Project
project = ObjectModelHelpers.CreateInMemoryProject(content);
2760
var
project = ObjectModelHelpers.CreateInMemoryProject(ObjectModelHelpers.FormatProjectContentsWithItemGroupFragment(projectContents));
2802
var
project = ObjectModelHelpers.CreateInMemoryProject(ObjectModelHelpers.FormatProjectContentsWithItemGroupFragment(projectContents));
3756
var
project = new Project(testFiles.ProjectFile, new Dictionary<string, string>(), null, projectCollection);
Definition\ProjectItemDefinition_Tests.cs (25)
35
Project
project = new Project(xml);
64
Project
project = new Project(xml);
81
Project
project = new Project(xml);
102
Project
project = new Project(xml);
131
Project
project = new Project(main);
161
Project
project = new Project(main);
215
Project
project = projectFromString.Project;
246
Project
project = projectFromString.Project;
273
Project
project = projectFromString.Project;
300
Project
project = projectFromString.Project;
331
Project
project = projectFromString.Project;
359
Project
project = projectFromString.Project;
363
Assert.Equal("%25(filename)",
Project
.GetMetadataValueEscaped(item, "m"));
389
Project
project = projectFromString.Project;
417
Project
project = projectFromString.Project;
452
Project
project = projectFromString.Project;
485
Project
project = new Project(XmlReader.Create(new StringReader(content)));
507
Project
project = new Project(XmlReader.Create(new StringReader(content)));
529
Project
project = new Project(XmlReader.Create(new StringReader(content)));
551
Project
project = new Project(XmlReader.Create(new StringReader(content)));
573
Project
project = new Project(XmlReader.Create(new StringReader(content)));
595
Project
project = new Project(XmlReader.Create(new StringReader(content)));
617
Project
project = new Project(XmlReader.Create(new StringReader(content)));
639
Project
project = new Project(XmlReader.Create(new StringReader(content)));
659
Project
project = projectFromString.Project; // No exception
Definition\ProjectMetadata_Tests.cs (19)
29
Project
project = new Project();
56
Project
project = new Project(projectXml);
89
Project
project = new Project();
109
Project
project = new Project();
127
Project
project = new Project();
160
Project
project = projectFromString.Project;
187
Project
project = projectFromString.Project;
213
Project
project = projectFromString.Project;
240
Project
project = projectFromString.Project;
272
Project
project = projectFromString.Project;
304
Project
project = projectFromString.Project;
336
Project
project = projectFromString.Project;
367
Project
project = projectFromString.Project;
396
Project
project = projectFromString.Project;
430
Project
project = projectFromString.Project;
447
Project
project = new Project();
467
Project
project = new Project(xml);
493
Project
project = projectFromString.Project;
505
Microsoft.Build.Evaluation.
Project
project = new Microsoft.Build.Evaluation.Project();
Definition\ProjectProperty_Tests.cs (14)
29
Project
project = new Project();
86
Project
project = new Project();
103
Project
project = new Project();
121
Project
project = new Project();
138
Project
project = new Project();
154
Project
project = new Project();
177
Project
project = new Project();
194
Project
project = new Project(globalProperties, null, ProjectCollection.GlobalProjectCollection);
208
Project
project = new Project();
224
Project
project = new Project();
243
Project
project = new Project();
266
Project
import = new Project();
272
Project
project = new Project(xml);
291
Project
project = new Project(projectXml);
Definition\ProtectImports_Tests.cs (33)
134
Project
project = GetProject();
149
Project
project = GetProject();
165
Project
project = GetProject();
184
Project
project = GetProject();
199
Project
project = GetProject();
214
Project
project = GetProject();
229
Project
project = GetProject();
242
Project
project = GetProject();
256
Project
project = GetProject();
270
Project
project = GetProject();
284
Project
project = GetProject();
304
Project
project = GetProject();
319
Project
project = GetProject();
334
Project
project = GetProject();
349
Project
project = GetProject();
362
Project
project = GetProject();
376
Project
project = GetProject();
391
Project
project = GetProject();
407
Project
project = GetProject();
427
Project
project = GetProject();
442
Project
project = GetProject();
455
Project
project = GetProject();
469
Project
project = GetProject();
483
Project
project = GetProject();
523
private ProjectItem GetImportedItem(
Project
project)
539
private ProjectMetadata GetImportedMetadata(
Project
project)
556
private ProjectMetadata GetNonOverridableMetadata(
Project
project)
573
private ProjectMetadata GetOverridableMetadata(
Project
project)
589
private
Project
GetProject()
607
Project
project = projectFromString.Project;
617
private ProjectProperty GetProperty(
Project
project)
630
private ProjectItem GetProjectItem(
Project
project)
646
private ProjectMetadata GetProjectMetadata(
Project
project)
Instance\ProjectInstance_Tests.cs (7)
40
Project
p = new Project();
204
Project
p = new Project(ProjectRootElement.Create(), globals, null);
427
var
projBEval = new Project(projB, null, null, pc);
469
var
projBEval = new Project(projB, null, null, pc, loadSettings);
511
var
projBEval = new Project(projB, null, null, pc);
1031
Project
project = projectFromString.Project;
1043
Project
project = new Project(xml);
Instance\ProjectItemInstance_Tests.cs (3)
251
Project
project = new Project();
346
Project
project = new Project();
1193
Project
project = new Project();
Instance\ProjectMetadataInstance_Tests.cs (1)
34
Project
project = new Project();
Instance\ProjectOnErrorInstance_Tests.cs (1)
47
Project
project = new Project(xml);
Instance\ProjectPropertyInstance_Tests.cs (2)
91
var
project = new Project();
103
Project
project = new Project();
Instance\ProjectTargetInstance_Tests.cs (5)
56
Project
project = new Project(projectXml);
76
Project
project = new Project(projectXml);
96
Project
project = new Project(projectXml);
121
Project
project = new Project(projectXml);
147
Project
project = new Project(xml);
Instance\ProjectTaskInstance_Tests.cs (1)
77
Project
project = new Project(xml);
Instance\ProjectTaskOutputItemInstance_Tests.cs (1)
50
Project
project = new Project(xml);
Instance\ProjectTaskOutputPropertyInstance_Tests.cs (1)
50
Project
project = new Project(xml);
ObjectModelRemoting\Helpers\TestCollectionGroup.cs (8)
200
private IReadOnlyDictionary<ProjectCollectionLinker, HashSet<
Project
>> ImmutableProjects { get; set; }
205
var result = new Dictionary<ProjectCollectionLinker, HashSet<
Project
>>();
207
result.Add(this.Local, new HashSet<
Project
>(this.Local.Collection.LoadedProjects));
211
result.Add(r, new HashSet<
Project
>(r.Collection.LoadedProjects));
245
HashSet<
Project
> toKeep = null;
253
var toUnload = new List<
Project
>();
254
foreach (
var
p in linker.Collection.LoadedProjects)
262
foreach (
var
p in toUnload)
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (4)
472
public static void VerifyProjectCollectionLinks(IEnumerable<
Project
> projects, int expectedLocal, int expectedLinks)
474
HashSet<
Project
> remotes = new HashSet<
Project
>();
477
foreach (
var
prj in projects)
ObjectModelRemoting\Helpers\ViewValidation.cs (1)
270
if (VerifyCheckType<
Project
>(view, real, context, Verify))
ObjectModelRemoting\Helpers\ViewValidation.evaluation.cs (10)
14
internal sealed class ProjectPair : LinkPair<
Project
>
16
public ProjectPair(
Project
view,
Project
real)
54
var
toAdd = this.Get(where);
61
var
toAdd = this.Get(where);
83
var
toAdd = this.Get(where);
310
public static void Verify(
Project
view,
Project
real, ValidationContext context = null)
328
var
real = pair.Real;
329
var
view = pair.View;
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (4)
19
public
Project
LocalBig { get; }
20
public
Project
TargetBig { get; }
43
var
newReal = this.StdGroup.Target.LoadInMemoryWithSettings(TestCollectionGroup.SampleProjectFile);
45
var
newView = this.StdGroup.Local.GetLoadedProjects(tempPath).FirstOrDefault();
ObjectModelRemoting\LinkedConstructionReadOnly_Tests.cs (3)
30
var
projReal = this.Remote[0].LoadProjectIgnoreMissingImports(this.BigFile);
35
var
projView = this.Local.GetLoadedProjects(this.BigFile).FirstOrDefault();
47
var
projView = this.Local.GetLoadedProjects(this.BigFile).FirstOrDefault();
ObjectModelRemoting\LinkedEvaluationModify_Tests.cs (8)
38
var
realProj = pcRemote.LoadProject(proj1Path);
40
var
viewProj = pcLocal.Collection.GetLoadedProjects(proj1Path).FirstOrDefault();
112
var
realProj = pcRemote.LoadProject(proj1Path);
114
var
viewProj = pcLocal.Collection.GetLoadedProjects(proj1Path).FirstOrDefault();
308
var
realProj = pcRemote.LoadProject(proj1Path);
310
var
viewProj = pcLocal.Collection.GetLoadedProjects(proj1Path).FirstOrDefault();
344
var
realProj = pcRemote.LoadProject(proj1Path);
346
var
viewProj = pcLocal.Collection.GetLoadedProjects(proj1Path).FirstOrDefault();
ObjectModelRemoting\LinkedEvaluationReadOnly_Tests.cs (5)
17
public
Project
Real { get; }
18
public
Project
View { get; private set; }
24
var
projReal = this.Remote[0].LoadProjectWithSettings(this.BigFile, ProjectLoadSettings.IgnoreMissingImports | ProjectLoadSettings.RecordDuplicateButNotCircularImports);
29
var
projView = this.Local.GetLoadedProjects(this.BigFile).FirstOrDefault();
41
var
projView = this.Local.GetLoadedProjects(this.BigFile).FirstOrDefault();
ObjectModelRemoting\LinkedProjectCollection_Tests.cs (12)
35
var
proj1 = pcLocal.LoadProject(proj1Path);
36
var
proj2 = pcRemote.LoadProject(proj2Path);
55
var
localProj = pcLocal.Collection.GetLoadedProjects(proj1Path).FirstOrDefault();
58
var
remoteProj = pcLocal.Collection.GetLoadedProjects(proj2Path).FirstOrDefault();
75
var
proj0local = pcLocal.LoadProject(proj0Path);
76
var
proj1local = pcLocal.LoadProject(proj1Path);
78
var
proj1remote0 = pcRemote0.LoadProject(proj1Path);
79
var
proj2remote0 = pcRemote0.LoadProject(proj2Path);
81
var
proj2remote1 = pcRemote1.LoadProject(proj2Path);
82
var
proj3remote1 = pcRemote1.LoadProject(proj3Path);
110
foreach (
var
p in prj2Coll)
139
var
proj1 = pcRemote.LoadProject(proj1Path);
ObjectModelRemoting\LinkedSpecialCasesScenarios.cs (7)
22
public
Project
LocalBig { get; }
23
public
Project
TargetBig { get; }
24
public
Project
GuestBig { get; }
54
var
targetView = this.Local.GetLoadedProjects(this.TargetBigPath).FirstOrDefault();
61
var
guestView = this.Local.GetLoadedProjects(this.GuestBigPath).FirstOrDefault();
80
var
newReal = this.StdGroup.Target.LoadInMemoryWithSettings(content, ProjectLoadSettings.IgnoreMissingImports);
82
var
newView = this.StdGroup.Local.GetLoadedProjects(tempPath).FirstOrDefault();
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectItemDefinitionLink.cs (3)
21
public MockProjectLinkRemoter Project => this.OwningCollection.Export<
Project
, MockProjectLinkRemoter>(this.Source.Project);
45
public override
Project
Project => this.Linker.Import<
Project
, MockProjectLinkRemoter>(this.Proxy.Project);
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectItemLink.cs (3)
22
public MockProjectLinkRemoter Project => this.OwningCollection.Export<
Project
, MockProjectLinkRemoter>(this.Source.Project);
53
public override
Project
Project => this.Linker.Import<
Project
, MockProjectLinkRemoter>(this.Proxy.Project);
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectLink.cs (2)
19
internal sealed class MockProjectLinkRemoter : MockLinkRemoter<
Project
>
21
public override
Project
CreateLinkedObject(IImportHolder holder)
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectPropertyLink.cs (3)
21
public MockProjectLinkRemoter Project => this.OwningCollection.Export<
Project
, MockProjectLinkRemoter>(this.Source.Project);
47
public override
Project
Project => this.Linker.Import<
Project
, MockProjectLinkRemoter>(this.Proxy.Project);
ObjectModelRemoting\RemoteProjectsProviderMock\ExporterMock.cs (11)
163
public
Project
LoadProject(string path) => this.Collection.LoadProject(path);
165
public
Project
LoadProjectIgnoreMissingImports(string path) => LoadProjectWithSettings(path, ProjectLoadSettings.IgnoreMissingImports);
167
public
Project
LoadProjectWithSettings(string path, ProjectLoadSettings settings) => new Project(path, null, null, this.Collection, settings);
170
public
Project
LoadInMemoryWithSettings(string content, ProjectLoadSettings settings = ProjectLoadSettings.Default)
175
Project
project = new Project(xml, null, null, this.Collection, settings);
344
public override ICollection<
Project
> GetLoadedProjects(string filePath)
346
List<
Project
> result = new List<
Project
>();
352
result.Add(this.Import<
Project
, MockProjectLinkRemoter>(remote));
364
foreach (
var
p in toRemote)
366
remoted.Add(this.Export<
Project
, MockProjectLinkRemoter>(p));
Microsoft.Build.Engine.UnitTests (522)
BackEnd\BatchingEngine_Tests.cs (2)
488
Project
project = projectFromString.Project;
522
Project
project = projectFromString.Project;
BackEnd\BuildManager_Tests.cs (36)
442
Project
project = CreateProject(CleanupFileContents(contents), MSBuildDefaultToolsVersion, _projectCollection, false);
492
Project
project = CreateProject(CleanupFileContents(contents), MSBuildDefaultToolsVersion,
650
var
project = CreateProject(contents, null, _projectCollection, false);
703
var
project = CreateProject(contents, null, _projectCollection, false);
773
var
project = CreateProject(contents, null, _projectCollection, false);
833
var
project = CreateProject(contents, null, _projectCollection, false);
900
var
project = CreateProject(contents, null, projectCollection, false);
931
var
project = CreateProject(contents, null, _projectCollection, false);
1152
var
project = CreateProject(contents, null, _projectCollection, false);
1775
Project
project = CreateProject(contents, MSBuildDefaultToolsVersion, _projectCollection, true);
1806
Project
project = CreateProject(contents, MSBuildDefaultToolsVersion, _projectCollection, true);
1841
Project
project = CreateProject(contents, MSBuildDefaultToolsVersion, _projectCollection, true);
1898
Project
project = CreateProject(contents, MSBuildDefaultToolsVersion, _projectCollection, true);
1926
Project
project = _projectCollection.LoadProject(data.ProjectFullPath);
1952
Project
project = _projectCollection.LoadProject(data.ProjectFullPath);
1984
Project
project = _projectCollection.LoadProject(data.ProjectFullPath);
2044
Project
project2 = projectCollection2.LoadProject(p2pProject);
2115
Project
project = projectCollection.LoadProject(rootProjectPath);
2265
var
project = new Project(fileName);
2316
Project
project = new Project(fileName);
3121
var
project1 = new Project(projectPath1);
3126
var
project2 = new Project(projectPath2);
3189
var
project1 = new Project(projectPath1);
3204
var
project2 = new Project(projectPath2);
3274
var
project1 = new Project(projectPath1);
3289
var
project2 = new Project(projectPath2);
3408
Project
project = CreateProject(contents, MSBuildDefaultToolsVersion, _projectCollection, true);
3438
Project
project = CreateProject(contents, MSBuildDefaultToolsVersion, _projectCollection, true);
3469
Project
project = CreateProject(contents, MSBuildDefaultToolsVersion, _projectCollection, true);
3578
Project
project = CreateProject(contents, toolsVersion, projectCollection, deleteTempProject);
3596
private
Project
CreateProject(string contents, string toolsVersion, ProjectCollection projectCollection, bool deleteTempProject)
3599
Project
project = projectFromString.Project;
3706
var
mainProject = new Project(mainRootElement, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, collection);
3730
var
p2pProject = new Project(p2pProjectPath, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, collection);
3857
var
project = new Project(root, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion,
4411
Project
project = CreateProject(projectContents, MSBuildDefaultToolsVersion, _projectCollection, true);
BackEnd\BuildRequestConfiguration_Tests.cs (6)
186
Project
project = projectFromString.Project;
284
Project
project = projectFromString.Project;
361
Project
project = projectFromString.Project;
463
Project
project = projectFromString.Project;
559
var
project =
Project
.FromXmlReader(
BackEnd\BuildRequestEngine_Tests.cs (1)
247
Project
project = projectFromString.Project;
BackEnd\ConfigurationMetadata_Tests.cs (6)
52
Project
project = null;
75
Project
project = CreateProject();
91
Project
project = CreateProject();
107
Project
project = CreateProject();
144
private
Project
CreateProject()
154
Project
project = projectFromString.Project;
BackEnd\IntrinsicTask_Tests.cs (59)
190
Project
p = projectFromString.Project;
227
Project
p = projectFromString.Project;
914
Project
p = projectFromString.Project;
953
Project
p = projectFromString.Project;
1085
Project
p = projectFromString.Project;
1169
Project
p = projectFromString.Project;
1224
Project
p = projectFromString.Project;
1247
Project
p = projectFromString.Project;
1278
Project
project = projectFromString.Project;
1310
Project
project = projectFromString.Project;
1338
Project
p = projectFromString.Project;
1360
Project
p = projectFromString.Project;
1380
Project
p = projectFromString.Project;
1402
Project
p = projectFromString.Project;
1427
Project
p = projectFromString.Project;
1452
Project
p = projectFromString.Project;
1487
Project
p = projectFromString.Project;
1529
Project
p = projectFromString.Project;
1580
Project
p = projectFromString.Project;
1690
Project
p = projectFromString.Project;
2297
Project
project = projectFromString.Project;
2331
Project
project = projectFromString.Project;
2368
Project
project = projectFromString.Project;
2406
Project
project = projectFromString.Project;
2442
Project
project = projectFromString.Project;
2481
Project
project = projectFromString.Project;
2512
Project
project = projectFromString.Project;
2568
Project
p = projectFromString.Project;
2594
Project
p = projectFromString.Project;
2638
Project
p = projectFromString.Project;
2681
Project
p = projectFromString.Project;
2725
Project
p = projectFromString.Project;
2769
Project
p = projectFromString.Project;
2814
Project
p = projectFromString.Project;
2887
Project
p = projectFromString.Project;
2937
Project
p = projectFromString.Project;
3167
Project
p = projectFromString.Project;
3198
Project
project = projectFromString.Project;
3244
Project
project = projectFromString.Project;
3286
Project
p = projectFromString.Project;
3314
Project
p = projectFromString.Project;
3360
Project
p = projectFromString.Project;
3405
Project
p = projectFromString.Project;
3445
Project
p = projectFromString.Project;
3482
Project
p = projectFromString.Project;
3508
Project
p = projectFromString.Project;
3576
Project
p = projectFromString.Project;
3612
Project
p = projectFromString.Project;
3643
Project
p = projectFromString.Project;
3670
Project
p = projectFromString.Project;
3699
Project
p = projectFromString.Project;
3728
Project
p = projectFromString.Project;
3757
Project
p = projectFromString.Project;
3795
Project
p = projectFromString.Project;
3823
Project
p = projectFromString.Project;
3852
Project
p = projectFromString.Project;
3891
Project
p = projectFromString.Project;
3953
Project
project = projectFromString.Project;
3988
var
project = new Project(p, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, c);
BackEnd\LoggingServicesLogMethod_Tests.cs (1)
471
Project
msbuildProject = new Project(projectFile);
BackEnd\MSBuild_Tests.cs (18)
82
Project
p = ObjectModelHelpers.CreateInMemoryProject(parentProjectContents);
141
Project
p = ObjectModelHelpers.CreateInMemoryProject(parentProjectContents);
186
Project
project = ObjectModelHelpers.CreateInMemoryProject(projectContents, logger);
554
Project
p = ObjectModelHelpers.CreateInMemoryProject(parentProjectContents);
623
Project
p = ObjectModelHelpers.CreateInMemoryProject(parentProjectContents);
930
Project
p = ObjectModelHelpers.CreateInMemoryProject(parentProjectContents);
997
Project
p = ObjectModelHelpers.CreateInMemoryProject(parentProjectContents);
1050
Project
p = ObjectModelHelpers.CreateInMemoryProject(parentProjectContents);
1119
Project
p = ObjectModelHelpers.CreateInMemoryProject(parentProjectContents);
1186
Project
p = ObjectModelHelpers.CreateInMemoryProject(parentProjectContents);
1254
Project
p = ObjectModelHelpers.CreateInMemoryProject(parentProjectContents);
1340
Project
p = ObjectModelHelpers.CreateInMemoryProject(parentProjectContents, logger);
1559
Project
p = ObjectModelHelpers.CreateInMemoryProject(pc, parentProjectContents, logger);
1580
Project
p2 = ObjectModelHelpers.CreateInMemoryProject(pc, parentProjectContents, logger2);
1689
Project
p = ObjectModelHelpers.CreateInMemoryProject(parentProjectContents, logger);
1801
Project
p = ObjectModelHelpers.CreateInMemoryProject(parentProjectContents);
1849
Project
project = new Project(projectFile2);
1885
Project
project = new Project(projectFile2);
BackEnd\OnError_Tests.cs (21)
46
Project
p = projectFromString.Project;
174
Project
p = projectFromString.Project;
205
Project
p = projectFromString.Project;
238
Project
p = projectFromString.Project;
271
Project
p = projectFromString.Project;
303
Project
p = projectFromString.Project;
330
Project
p = projectFromString.Project;
358
Project
p = projectFromString.Project;
386
Project
p = projectFromString.Project;
418
Project
p = projectFromString.Project;
459
Project
p = projectFromString.Project;
486
Project
p = projectFromString.Project;
516
Project
p = projectFromString.Project;
541
Project
p = projectFromString.Project;
559
Project
p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
612
Project
p = projectFromString.Project;
634
Project
p = projectFromString.Project;
657
Project
p = projectFromString.Project;
680
Project
p = projectFromString.Project;
703
Project
p = projectFromString.Project;
726
Project
p = projectFromString.Project;
BackEnd\Scheduler_Tests.cs (1)
714
Project
project = projectFromString.Project;
BackEnd\SdkResultOutOfProc_Tests.cs (2)
222
Project
project =
Project
.FromProjectRootElement(projectRootElement, projectOptions);
BackEnd\TargetBuilder_Tests.cs (4)
328
Project
p = projectFromString.Project;
1348
Project
project = projectFromString.Project;
1375
Project
project = projectFromString.Project;
1678
Project
project = projectFromString.Project;
BackEnd\TargetEntry_Tests.cs (2)
862
Project
project = projectFromString.Project;
1182
Project
project = projectFromString.Project;
BackEnd\TargetUpToDateChecker_Tests.cs (10)
60
Project
p = projectFromString.Project;
91
Project
p = projectFromString.Project;
121
Project
p = projectFromString.Project;
320
Project
p = projectFromString.Project;
349
Project
p = projectFromString.Project;
378
Project
p = projectFromString.Project;
408
Project
p = projectFromString.Project;
443
Project
p = projectFromString.Project;
521
Project
p = projectFromString.Project;
608
Project
project = new Project(projectFile);
BackEnd\TaskBuilder_Tests.cs (13)
80
Project
project = projectFromString.Project;
133
Project
project = projectFromString.Project;
169
Project
project = projectFromString.Project;
239
Project
project = projectFromString.Project;
292
Project
project = projectFromString.Project;
363
Project
project = projectFromString.Project;
413
Project
project = projectFromString.Project;
451
Project
project = projectFromString.Project;
479
Project
project = projectFromString.Project;
503
Project
project = projectFromString.Project;
534
Project
project = projectFromString.Project;
565
Project
project = projectFromString.Project;
1244
Project
project = projectFromString.Project;
BackEnd\TaskExecutionHost_Tests.cs (1)
1564
Project
project = projectFromString.Project;
BinaryLogger_Tests.cs (2)
124
Project
project = ObjectModelHelpers.CreateInMemoryProject(collection, projectText);
220
Project
project = ObjectModelHelpers.CreateInMemoryProject(collection, projectText);
ChangeWaves_Tests.cs (1)
65
Project
p = collection.LoadProject(file.Path);
Collections\OMcollections_tests.cs (2)
311
Project
project = new Project();
323
Project
project = new Project();
ConsoleLogger_Tests.cs (4)
146
Microsoft.Build.Evaluation.
Project
project = new Microsoft.Build.Evaluation.Project();
217
var
p = pc.Collection.LoadProject(project.ProjectFile);
258
var
p = pc.Collection.LoadProject(project.ProjectFile);
310
var
p = pc.Collection.LoadProject(project.ProjectFile);
Construction\SolutionProjectGenerator_Tests.cs (7)
23
using Project = Microsoft.Build.Evaluation.
Project
;
311
Project
project = new Project(projectXml);
852
Project
msbuildProject = new Project(projectXml);
1058
var
automaticProject = new Project(automaticProjectFile);
1105
Project
msbuildProject = new Project(projectXml);
1175
Project
msbuildProject = new Project(projectXml);
1220
Project
msbuildProject = new Project(projectXml);
Construction\XmlReaderWithoutLocation_Tests.cs (1)
163
Project
project = new Project(noLineInfoReader);
Definition\ItemDefinitionGroup_Tests.cs (57)
43
Project
p = projectFromString.Project;
71
Project
p = projectFromString.Project;
104
Project
p = projectFromString.Project;
147
Project
p = projectFromString.Project;
165
Project
p = new Project(XmlReader.Create(new StringReader(
194
Project
p = new Project(XmlReader.Create(new StringReader(
222
Project
p = new Project(XmlReader.Create(new StringReader(
277
Project
p = projectFromString.Project;
297
Project
p = projectFromString.Project;
318
Project
p = projectFromString.Project;
347
Project
p = projectFromString.Project;
377
Project
p = projectFromString.Project;
409
Project
p = projectFromString.Project;
435
Project
p = projectFromString.Project;
462
Project
p = projectFromString.Project;
489
Project
p = projectFromString.Project;
516
Project
p = projectFromString.Project;
543
Project
p = projectFromString.Project;
570
Project
p = projectFromString.Project;
592
Project
p = projectFromString.Project;
628
Project
p = projectFromString.Project;
670
Project
p = projectFromString.Project;
720
Project
p = projectFromString.Project;
745
Project
p = projectFromString.Project;
771
Project
p = projectFromString.Project;
803
Project
p = projectFromString.Project;
816
Project
p = new Project(XmlReader.Create(new StringReader(@"
835
Project
p = new Project(XmlReader.Create(new StringReader(@"
851
Project
p = new Project(XmlReader.Create(new StringReader(@"
892
Project
p = projectFromString.Project;
922
Project
p = projectFromString.Project;
952
Project
p = projectFromString.Project;
983
Project
p = projectFromString.Project;
1014
Project
p = projectFromString.Project;
1044
Project
p = projectFromString.Project;
1062
Project
p = new Project(XmlReader.Create(new StringReader(@"
1114
Project
p = projectFromString.Project;
1142
Project
p = projectFromString.Project;
1172
Project
p = projectFromString.Project;
1202
Project
p = projectFromString.Project;
1237
Project
p = projectFromString.Project;
1264
Project
p = projectFromString.Project;
1293
Project
p = projectFromString.Project;
1322
Project
p = projectFromString.Project;
1351
Project
p = projectFromString.Project;
1384
Project
p = projectFromString.Project;
1418
Project
p = projectFromString.Project;
1460
Project
p = projectFromString.Project;
1518
Project
p = projectFromString.Project;
1612
Project
p = projectFromString.Project;
1644
Project
p = projectFromString.Project;
1671
Project
p = projectFromString.Project;
1699
Project
p = projectFromString.Project;
1729
Project
p = projectFromString.Project;
1790
Project
p = projectFromString.Project;
1842
Project
p = projectFromString.Project;
1864
private bool ItemContainsMetadata(
Project
project, string itemType, string itemInclude, string name, string value)
Definition\Project_Internal_Tests.cs (13)
56
Project
project = projectFromString.Project;
93
Project
project = projectFromString.Project;
96
Project
project2 = ProjectCollection.GlobalProjectCollection.LoadProject("c:\\123.proj", null, null);
133
Project
project = new Project();
153
var
project = ObjectModelHelpers.CreateInMemoryProject("<Project></Project>");
184
Project
project = new Project();
239
Project
project = projectFromString.Project;
279
Project
project =
Project
.FromFile(
307
Project
project =
Project
.FromProjectRootElement(
337
Project
project =
Project
.FromXmlReader(
Definition\ProjectEvaluationContext_Tests.cs (11)
110
Project
.FromFile(
163
var
project =
Project
.FromFile(
206
var
project =
Project
.FromXmlReader(
955
private void EvaluateProjects(IEnumerable<string> projectContents, EvaluationContext context, Action<
Project
> afterEvaluationAction)
984
private void EvaluateProjects(IEnumerable<ProjectSpecification> projectSpecs, EvaluationContext context, Action<
Project
> afterEvaluationAction)
988
var projects = new List<
Project
>();
995
var
project =
Project
.FromFile(
1009
foreach (
var
project in projects)
Definition\ProjectHelpers.cs (1)
27
Project
project = projectFromString.Project;
Definition\ProjectItem_Tests.cs (1)
83
Project
project = new Project(projectXml);
Definition\ToolsVersion_Tests.cs (5)
314
Project
project = projectFromString.Project;
351
Project
project = projectFromString.Project;
387
Project
project = projectFromString.Project;
417
Project
project = projectFromString.Project;
449
Project
project = projectFromString.Project;
EscapingInProjects_Tests.cs (22)
219
Project
project = ObjectModelHelpers.CreateInMemoryProject(projectOriginalContents);
264
Project
project = ObjectModelHelpers.CreateInMemoryProject(projectOriginalContents);
312
Project
project = ObjectModelHelpers.CreateInMemoryProject(projectOriginalContents);
363
Project
project = ObjectModelHelpers.CreateInMemoryProject(projectOriginalContents);
370
Assert.Equal("foo%253Bbar.weirdo",
Project
.GetEvaluatedItemIncludeEscaped(newItems.First()));
430
Project
project = ObjectModelHelpers.CreateInMemoryProject(projectOriginalContents);
472
Project
project = ObjectModelHelpers.CreateInMemoryProject(projectOriginalContents);
480
Assert.Equal("foo%253bbar.weirdo",
Project
.GetEvaluatedItemIncludeEscaped(newItems.First())); // "Newly added item should have correct EvaluatedIncludeEscaped"
514
Project
project = ObjectModelHelpers.CreateInMemoryProject(projectOriginalContents);
522
Assert.Equal("foo.AAA%253bBBB",
Project
.GetEvaluatedItemIncludeEscaped(newItems.First())); // "Newly added item should have correct EvaluatedIncludeEscaped"
650
Project
project = new Project(projectElement, null, null, collection);
679
Project
project = ObjectModelHelpers.CreateInMemoryProject(@"
708
Project
project = ObjectModelHelpers.CreateInMemoryProject(@"
742
Project
project = ObjectModelHelpers.CreateInMemoryProject(@"
800
Project
project = ObjectModelHelpers.CreateInMemoryProject(@"
833
Project
project = new Project(reader);
845
Project
project = new Project();
879
Project
project = new Project(reader);
911
Project
project = new Project(reader);
1818
internal static IEnumerable<ProjectItem> ModifyItemOfTypeInProject(
Project
project, string itemType, string oldEvaluatedInclude, string newEvaluatedInclude)
1847
Assert.Equal("%3B",
Project
.GetMetadataValueEscaped(item, "EscapedSemicolon"));
1853
Assert.Equal("%24",
Project
.GetMetadataValueEscaped(item, "EscapedDollarSign"));
Evaluation\EvaluationLogging_Tests.cs (3)
42
Action<
Project
, MockLogger> loggingTest = null,
44
Func<
Project
, MockLogger> reevaluationLoggerFactory = null)
88
var
project = new Project(projectFile, null, null, collection);
Evaluation\Evaluator_Tests.cs (106)
90
Project
project = new(projectFile.Path);
164
Project
project = projectFromString.Project;
172
Project
fooImport = projectFromStringFoo.Project;
185
Project
barImport = projectFromStringBar.Project;
320
Project
project = new Project(subdirProjPath);
516
Project
project = pc.LoadProject(projectPath);
559
Project
project = pc.LoadProject(testTargetPath);
604
Project
project = pc.LoadProject(testTargetPath);
647
Project
project = pc.LoadProject(testTargetPath);
693
Project
project = pc.LoadProject(testTargetPath);
737
Project
project = pc.LoadProject(testTargetPath);
783
Project
project = pc.LoadProject(testTargetPath);
845
Project
project = projectFromString.Project;
922
Project
project = projectFromString.Project;
957
Project
project = new Project(content.ProjectFile, null, null);
1007
Project
project = projectFromString.Project;
1071
Project
project = new Project(XmlReader.Create(new StringReader(manifest)), null, null, pc, ProjectLoadSettings.RejectCircularImports);
1086
Project
project = new Project();
1151
Project
project = new Project();
1209
Project
project = projectFromString.Project;
1273
Project
project = projectFromString.Project;
1310
Project
project = projectFromString.Project;
1358
Project
project = new Project(main);
1426
Project
project = projectFromString.Project;
1449
Project
project = projectFromString.Project;
1476
Project
project = projectFromString.Project;
1499
Project
project = projectFromString.Project;
1525
Project
project = projectFromString.Project;
1553
Project
project = projectFromString.Project;
1584
Project
project = projectFromString.Project;
1623
Project
project = projectFromString.Project;
1655
Project
project = projectFromString.Project;
1684
Project
project = projectFromString.Project;
1723
Project
project = projectFromString.Project;
1752
Project
project = projectFromString.Project;
1777
Project
project = projectFromString.Project;
1807
Project
project = projectFromString.Project;
1846
Project
project = projectFromString.Project;
1883
Project
project = projectFromString.Project;
1915
Project
project = projectFromString.Project;
2020
Project
project = projectFromString.Project;
2077
Project
project = projectFromString.Project;
2138
Project
project = projectFromString.Project;
2175
Project
project = projectFromString.Project;
2202
Project
project = projectFromString.Project;
2213
Project
project = new Project();
2313
Project
project = projectFromString.Project;
2338
Project
project = projectFromString.Project;
2362
Project
project = projectFromString.Project;
2442
Project
project = new Project(collection);
2476
Project
project = new Project(collection);
2494
Project
project = new Project(collection);
2552
Project
project = new Project(collection);
2571
Project
project = new Project(collection);
2627
Project
project = new Project(collection);
2646
Project
project = new Project(collection);
2666
Project
project = new Project();
2684
Project
project = new Project(collection);
2703
Project
project = new Project(collection);
2715
Project
project = new Project(xml);
2732
Project
project = new Project(xml);
2767
Project
project = new Project(xml);
2786
Project
project = new Project(xml);
2804
Project
project = new Project(xml);
2822
Project
project = new Project(xml);
2888
Project
project = projectFromString.Project;
2913
Project
project = projectFromString.Project;
2938
Project
project = projectFromString.Project;
2968
Project
project = projectFromString.Project;
2998
Project
project = projectFromString.Project;
3028
Project
project = projectFromString.Project;
3058
Project
project = projectFromString.Project;
3102
Project
project = projectFromString.Project;
3139
Project
project = new Project(XmlReader.Create(new StringReader(content)), globalProperties, null);
3174
Project
project = projectFromString.Project;
3208
Project
project = projectFromString.Project;
3240
Project
project = projectFromString.Project;
3270
Project
project = projectFromString.Project;
3307
Project
project = projectFromString.Project;
3353
Project
project = projectFromString.Project;
3407
Project
project = new Project(primaryProject, globalProperties, null);
3468
Project
project = new Project(primaryProject, globalProperties, null);
3528
Project
project = new Project(primaryProject, globalProperties, null);
3602
Project
project = new Project(primaryProject, globalProperties, null);
3675
Project
project = new Project(primaryProject, globalProperties, null);
3738
Project
project = new Project(primaryProject, globalProperties, null);
3800
Project
project = new Project(primaryProject, globalProperties, null);
3853
Project
project = projectFromString.Project;
3919
Project
project = projectFromString.Project;
3971
Project
project = projectFromString.Project;
4023
Project
project = projectFromString.Project;
4082
Project
project = projectFromString.Project;
4145
Project
project = projectFromString.Project;
4204
Project
project = projectFromString.Project;
4256
Project
project = projectFromString.Project;
4300
Project
project = projectFromString.Project;
4334
Project
project = new Project(null, ObjectModelHelpers.MSBuildDefaultToolsVersion, collection);
4380
Project
project = new Project(projectFilename);
4537
Project
unused = new Project(primaryProject, null, null);
4578
Project
project = projectFromString.Project;
4638
Project
project = new Project(primaryProject.ProjectFile, null, null);
4668
Project
project = new Project(primaryProject.ProjectFile, null, null);
4698
Project
project = projectFromString.Project;
5025
Project
project = pc.LoadProject(tempPath.Path);
5066
Project
project = pc.LoadProject(testTargetPath);
5216
Project
project = new Project(projectXml);
Evaluation\ImportFromMSBuildExtensionsPath_Tests.cs (8)
411
var
project = projColln.LoadProject(mainProjectPath);
505
var
project = projColln.LoadProject(mainProjectPath);
582
var
project = projectCollection.LoadProject(mainProjectPath);
713
var
project = projectCollection.LoadProject(mainProjectPath);
778
var
project = projectCollection.LoadProject(mainProjectPath);
885
private void CreateAndBuildProjectForImportFromExtensionsPath(string extnPathPropertyName, Action<
Project
, MockLogger> action)
919
Action<
Project
, MockLogger> action)
928
var
project = projColln.LoadProject(mainProjectPath);
Evaluation\IntrinsicFunctionOverload_Tests.cs (20)
38
Project
project = projectFromString.Project;
60
Project
project = projectFromString.Project;
82
Project
project = projectFromString.Project;
104
Project
project = projectFromString.Project;
124
Project
project = projectFromString.Project;
146
Project
project = projectFromString.Project;
168
Project
project = projectFromString.Project;
190
Project
project = projectFromString.Project;
210
Project
project = projectFromString.Project;
232
Project
project = projectFromString.Project;
254
Project
project = projectFromString.Project;
276
Project
project = projectFromString.Project;
296
Project
project = projectFromString.Project;
318
Project
project = projectFromString.Project;
340
Project
project = projectFromString.Project;
362
Project
project = projectFromString.Project;
382
Project
project = projectFromString.Project;
404
Project
project = projectFromString.Project;
426
Project
project = projectFromString.Project;
448
Project
project = projectFromString.Project;
Evaluation\ItemEvaluation_Tests.cs (2)
598
var
project = new Project(projectFiles.ProjectFile);
659
Project
project = Should.NotThrow(() => new Project(projectFiles.ProjectFile));
Evaluation\Preprocessor_Tests.cs (23)
55
Project
project = new Project();
84
Project
project = new Project(xml1);
128
Project
project = new Project(xml1);
172
Project
project = new Project(xml1);
216
Project
project = new Project(xml1);
264
Project
project = new Project(xml1);
298
Project
project = new Project(xml1);
363
Project
project;
419
Project
project = new Project(xml1);
477
Project
project = new Project(xml1);
550
Project
project = new Project(xml1);
611
Project
project = new Project(xml1);
671
Project
project = new Project(xml1);
725
Project
project = new Project(xml0);
792
Project
project = new Project();
826
Project
project = new Project(xml);
880
Project
project =
Project
.FromProjectRootElement(
983
var
project =
Project
.FromFile(projectPath, projectOptions);
1107
Project
project =
Project
.FromProjectRootElement(
1238
Project
project = new Project(xml1);
Evaluation\ProjectSdkImplicitImport_Tests.cs (15)
112
var
project = new Project(projectRootElement);
135
var
project = new Project(projectRootElement);
202
Project
project = new Project(projectRootElement);
305
Project
project = new Project(ProjectRootElement.Create(XmlReader.Create(new StringReader(content))));
334
var
project = new Project(projectRootElementFromString.Project);
372
var
project =
Project
.FromProjectRootElement(projectRootElement, projectOptions);
421
Project
project = new Project(ProjectRootElement.Create(XmlReader.Create(new StringReader(content))));
445
var
project = new Project(projectRootElement);
480
Project
project = new Project(rootElement,
520
var
project =
Project
.FromXmlReader(xmlReader, new ProjectOptions());
672
var
project =
Project
.FromXmlReader(xmlReader, projectOptions);
821
private void VerifyPropertyFromImplicitImport(
Project
project, string propertyName, string expectedContainingProjectPath, string expectedValue)
Evaluation\SdkResultEvaluation_Tests.cs (9)
46
private
Project
CreateProject(string projectPath, ProjectOptions projectOptions)
52
var
project =
Project
.FromProjectRootElement(projectRootElement, projectOptions);
75
private void ValidateExpectedPropertiesAndItems(bool includePropertiesAndItems,
Project
project, int expectedItemCount = 1)
132
var
project = CreateProject(projectPath, projectOptions);
204
var
project = CreateProject(projectPath, projectOptions);
303
var
project = CreateProject(projectPath, projectOptions);
394
var
project = CreateProject(projectPath, projectOptions);
450
var
project = CreateProject(projectPath, projectOptions);
EvaluationProfiler_Tests.cs (3)
281
var
project = CreateProject(content, MSBuildDefaultToolsVersion, projectCollection);
302
private
Project
CreateProject(string contents, string toolsVersion, ProjectCollection projectCollection)
305
Project
project = projectFromString.Project;
FileLogger_Tests.cs (4)
13
using Project = Microsoft.Build.Evaluation.
Project
;
31
Project
project = ObjectModelHelpers.CreateInMemoryProject(@"
368
Project
project = ObjectModelHelpers.CreateInMemoryProject(@"
406
Project
project = ObjectModelHelpers.CreateInMemoryProject(@"
FixPathOnUnix_Tests.cs (1)
48
var
project = projColln.LoadProject(buildProjectPath);
Graph\ResultCacheBasedBuilds_Tests.cs (4)
145
var
project =
Project
.FromFile(
309
var
project =
Project
.FromFile(
Instance\HostServices_Tests.cs (6)
409
Project
project = LoadDummyProject("foo.proj");
428
Project
project1 = LoadDummyProject("foo.proj");
429
Project
project2 = LoadDummyProject("foo.proj");
484
Project
project = projectFromString.Project;
494
public
Project
LoadDummyProject(string fileName)
507
Project
project =
Instance\ProjectInstance_Internal_Tests.cs (1)
969
Project
project = projectFromString.Project;
Instance\ProjectMetadataInstance_Internal_Tests.cs (1)
56
Project
project = new Project();
Instance\ProjectPropertyInstance_Internal_Tests.cs (1)
94
Project
project = new Project();
Instance\TaskItem_Tests.cs (4)
213
Project
project = new();
280
Project
project = new Project(xml);
334
Project
project = new Project(xml);
369
Project
project = new Project(xml);
Parser_Tests.cs (1)
577
var
project = ObjectModelHelpers.CreateInMemoryProject(projectContent);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (2)
TargetTests.cs (2)
926
Project
proj = new Project(reader);
956
static void addTask(
Project
proj, string taskName, Dictionary<string, string> parameters)
Microsoft.Build.Tasks.UnitTests (32)
AddToWin32Manifest_Tests.cs (1)
112
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(projectFile, touchProject: false);
AssignLinkMetadata_Tests.cs (1)
178
Project
p = new Project(collection)
CallTarget_Tests.cs (1)
152
Project
project = ObjectModelHelpers.CreateInMemoryProject(@"
DirectoryBuildProjectImportTestBase.cs (4)
77
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(ObjectModelHelpers.CreateFileInTempProjectDirectory(_projectRelativePath, @"
106
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(ObjectModelHelpers.CreateFileInTempProjectDirectory(_projectRelativePath, $@"
137
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(ObjectModelHelpers.CreateFileInTempProjectDirectory(_projectRelativePath, $@"
165
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(ObjectModelHelpers.CreateFileInTempProjectDirectory(_projectRelativePath, @"
MSBuild_Tests.cs (4)
169
Project
project = ObjectModelHelpers.CreateInMemoryProject(projectContents, logger);
1387
Project
project = new Project(projectFile2);
1473
Project
project = new Project(projectFile2);
1509
Project
project = new Project(projectFile1);
MSBuildInternalMessage_Tests.cs (1)
45
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(projectFile, touchProject: false);
NuGetPropsImportTests.cs (2)
54
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(projectRelativePath);
80
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(projectRelativePath);
OutputPathTests.cs (4)
62
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(projectFilePath, touchProject: false);
98
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(projectFilePath, touchProject: false);
141
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(projectFilePath, touchProject: false);
177
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(projectFilePath, touchProject: false);
ProjectExtensionsImportTestBase.cs (8)
56
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(ObjectModelHelpers.CreateFileInTempProjectDirectory(_projectRelativePath, @"
77
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(ObjectModelHelpers.CreateFileInTempProjectDirectory(_projectRelativePath, $@"
102
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(ObjectModelHelpers.CreateFileInTempProjectDirectory(_projectRelativePath, $@"
138
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(ObjectModelHelpers.CreateFileInTempProjectDirectory(_projectRelativePath, $@"
170
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(ObjectModelHelpers.CreateFileInTempProjectDirectory(_projectRelativePath, $@"
197
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(ObjectModelHelpers.CreateFileInTempProjectDirectory(_projectRelativePath, @"
215
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(ObjectModelHelpers.CreateFileInTempProjectDirectory(_projectRelativePath, @"
241
Project
project = ObjectModelHelpers.LoadProjectFileInTempProjectDirectory(ObjectModelHelpers.CreateFileInTempProjectDirectory(_projectRelativePath, @"
RegressionTests.cs (2)
33
Project
project = ObjectModelHelpers.CreateInMemoryProject($@"
60
var
project = ObjectModelHelpers.CreateInMemoryProject($@"
XmlPeek_Tests.cs (1)
337
Project
project = ObjectModelHelpers.CreateInMemoryProject(@"<Project><Target Name=""Test""><XmlPeek /></Target></Project>", log);
XmlPoke_Tests.cs (3)
145
Project
project = ObjectModelHelpers.CreateInMemoryProject(@"<Project><Target Name=""Test""><XmlPoke /></Target></Project>", log);
157
Project
project = ObjectModelHelpers.CreateInMemoryProject(projectContent, log);
170
Project
project = ObjectModelHelpers.CreateInMemoryProject(projectContent, log);
Microsoft.Build.UnitTests.Shared (21)
EngineTestEnvironment.cs (1)
218
Project
project = new Project(ProjectFile, globalProperties, toolsVersion, projectCollection);
MockEngine.cs (1)
247
Project
project = _projectCollection.LoadProject(projectFileName, finalGlobalProperties, toolsVersion);
ObjectModelHelpers.cs (18)
106
public static ProjectItem AssertSingleItem(
Project
p, string type, string itemInclude)
679
public static
Project
CreateInMemoryProject(string xml)
690
public static
Project
CreateInMemoryProject(string xml, params ILogger[] loggers)
704
public static
Project
CreateInMemoryProject(ProjectCollection projectCollection, string xml, params ILogger[] loggers)
717
public static
Project
CreateInMemoryProject(
732
Project
project = new Project(
775
Project
project = CreateInMemoryProject(collection, projectContents, loggers);
803
Project
project = CreateInMemoryProject(collection, projectContents, loggers);
814
Project
project,
971
public static
Project
LoadProjectFileInTempProjectDirectory(string projectFileRelativePath)
981
public static
Project
LoadProjectFileInTempProjectDirectory(string projectFileRelativePath, bool touchProject)
988
Project
project = new Project(projectFileFullPath, null, null, projectCollection);
1027
Project
project = LoadProjectFileInTempProjectDirectory(projectFileRelativePath);
1091
public static string GetConcatenatedItemsOfType(this
Project
project, string itemType, string itemSeparator = ";")
1103
Project
project = new Project(projectXml);
1360
Project
project = projectFromString.Project;
1376
Project
project = projectFromString.Project;
1585
public static void VerifyAssertProjectContent(string expected,
Project
project)
ProjectFromString.cs (1)
17
public
Project
Project { get; init; }
Microsoft.Build.Utilities.UnitTests (2)
ToolLocationHelper_Tests.cs (2)
3585
Project
project = pc.LoadProject(testProjectFile);
3657
Project
project = pc.LoadProject(testProjectFile);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (12)
Build\ProjectBuildManager.cs (5)
81
private static async Task<(MSB.Evaluation.
Project
? project, DiagnosticLog log)> LoadProjectAsync(
113
var
project = new MSB.Evaluation.Project(
129
public Task<(MSB.Evaluation.
Project
? project, DiagnosticLog log)> LoadProjectAsync(
224
MSB.Evaluation.
Project
project, DiagnosticLog log, CancellationToken cancellationToken)
235
MSB.Evaluation.
Project
project, string[] requiredTargets, string[] optionalTargets, DiagnosticLog log, CancellationToken cancellationToken)
MSBuild\CSharp\CSharpProjectFile.cs (1)
13
public CSharpProjectFile(CSharpProjectFileLoader loader, MSB.Evaluation.
Project
? project, ProjectBuildManager buildManager, DiagnosticLog log)
MSBuild\CSharp\CSharpProjectFileLoader.cs (1)
17
protected override ProjectFile CreateProjectFile(MSB.Evaluation.
Project
? project, ProjectBuildManager buildManager, DiagnosticLog log)
MSBuild\ProjectFile\ProjectFile.cs (2)
23
private readonly MSB.Evaluation.
Project
? _loadedProject;
31
protected ProjectFile(ProjectFileLoader loader, MSB.Evaluation.
Project
? loadedProject, ProjectBuildManager buildManager, DiagnosticLog log)
MSBuild\ProjectFile\ProjectFileLoader.cs (1)
16
protected abstract ProjectFile CreateProjectFile(MSB.Evaluation.
Project
? project, ProjectBuildManager buildManager, DiagnosticLog log);
MSBuild\VisualBasic\VisualBasicProjectFile.cs (1)
13
public VisualBasicProjectFile(VisualBasicProjectFileLoader loader, MSB.Evaluation.
Project
? loadedProject, ProjectBuildManager buildManager, DiagnosticLog log)
MSBuild\VisualBasic\VisualBasicProjectFileLoader.cs (1)
17
protected override ProjectFile CreateProjectFile(MSB.Evaluation.
Project
? project, ProjectBuildManager buildManager, DiagnosticLog log)
Microsoft.DotNet.Arcade.Sdk (2)
src\InstallDotNetCore.cs (2)
91
var
proj =
Project
.FromFile(VersionsPropsPath, new Build.Definition.ProjectOptions() { ProjectCollection = new ProjectCollection() });
MSBuild (5)
JsonOutputFormatter.cs (1)
82
internal void AddItemsInJsonFormat(string[] itemNames,
Project
project)
XMake.cs (4)
838
Project
project = collection.LoadProject(projectFile, globalProperties, toolsVersion);
1086
private static ExitType OutputPropertiesAfterEvaluation(string[] getProperty, string[] getItem,
Project
project, TextWriter outputStream)
1434
Project
project = projectCollection.LoadProject(projectFile, globalProperties, toolsVersion);
1714
Project
project = projectCollection.LoadProject(projectFile, globalProperties, toolsVersion);
TaskUsageLogger (5)
TaskUsageLogger.cs (5)
113
Project
p = _privateCollection.LoadProject(e.ProjectFile, e.GlobalProperties, e.ToolsVersion);
186
private void GatherAndEvaluateDefaultTasksForToolsVersion(string toolsVersion,
Project
containingProject)
217
private void GatherAndEvaluateTasksForProject(
Project
p, int projectContextId)
245
private void GatherAndEvaluatedTasksInFile(ProjectRootElement pre,
Project
containingProject, HashSet<UsingTaskData> usingTasks)
299
private string EvaluateIfNecessary(string unevaluatedString,
Project
containingProject)