188 references to GlobalProjectCollection
dotnet-openapi (1)
Commands\BaseCommand.cs (1)
127var project = ProjectCollection.GlobalProjectCollection.LoadProject(
Microsoft.Build (29)
BackEnd\BuildManager\BuildManager.cs (1)
1895ProjectCollection.GlobalProjectCollection,
BackEnd\Node\OutOfProcNode.cs (2)
736ProjectCollection.GlobalProjectCollection.RemoveAllToolsets(); 740ProjectCollection.GlobalProjectCollection.AddToolset(toolSet);
Construction\ProjectRootElement.cs (8)
721return Create(ProjectCollection.GlobalProjectCollection, Project.DefaultNewProjectTemplateOptions); 730return Create(ProjectCollection.GlobalProjectCollection, projectFileOptions); 758return Create(path, ProjectCollection.GlobalProjectCollection, Project.DefaultNewProjectTemplateOptions); 767return Create(path, ProjectCollection.GlobalProjectCollection, newProjectFileOptions); 803return Create(xmlReader, ProjectCollection.GlobalProjectCollection, preserveFormatting: false); 836return Open(path, ProjectCollection.GlobalProjectCollection); 878return TryOpen(path, ProjectCollection.GlobalProjectCollection); 1757return new ProjectRootElement(document, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
Definition\Project.cs (7)
134: this(ProjectRootElement.Create(ProjectCollection.GlobalProjectCollection, newProjectFileOptions)) 209: this(xml, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 303: this(xmlReader, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 396: this(projectFile, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 500options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 519options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 538options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection,
Definition\ProjectOptions.cs (1)
34/// The <see cref="ProjectCollection"/> the project is added to. Default is <see cref="ProjectCollection.GlobalProjectCollection"/>.
Graph\ProjectGraph.cs (6)
116: this(new ProjectGraphEntryPoint(entryProjectFile).AsEnumerable(), ProjectCollection.GlobalProjectCollection, null) 129: this(ProjectGraphEntryPoint.CreateEnumerable(entryProjectFiles), ProjectCollection.GlobalProjectCollection, null) 206: this(new ProjectGraphEntryPoint(entryProjectFile, globalProperties).AsEnumerable(), ProjectCollection.GlobalProjectCollection, null) 223: this(ProjectGraphEntryPoint.CreateEnumerable(entryProjectFiles, globalProperties), ProjectCollection.GlobalProjectCollection, null) 277: this(entryPoint.AsEnumerable(), ProjectCollection.GlobalProjectCollection, null) 289: this(entryPoints, ProjectCollection.GlobalProjectCollection, null)
Instance\ProjectInstance.cs (4)
220: this(projectFile, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 325: this(xml, null, null, ProjectCollection.GlobalProjectCollection) 866options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 885options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection,
Microsoft.Build.Engine.OM.UnitTests (86)
Construction\ProjectFormatting_Tests.cs (14)
36ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 113ProjectCollection.GlobalProjectCollection, 149ProjectCollection.GlobalProjectCollection, 185ProjectCollection.GlobalProjectCollection, 216ProjectCollection.GlobalProjectCollection, 246ProjectCollection.GlobalProjectCollection, 280ProjectCollection.GlobalProjectCollection, 319ProjectCollection.GlobalProjectCollection, 362ProjectCollection.GlobalProjectCollection, 389ProjectCollection.GlobalProjectCollection, 416ProjectRootElement xml = ProjectRootElement.Open(file, ProjectCollection.GlobalProjectCollection, 444ProjectCollection.GlobalProjectCollection, 471ProjectRootElement xml = ProjectRootElement.Open(file, ProjectCollection.GlobalProjectCollection, 694var project = new Project(ProjectRootElement.Open(file, ProjectCollection.GlobalProjectCollection));
Construction\ProjectMetadataElement_Tests.cs (12)
559ProjectCollection.GlobalProjectCollection, 603ProjectCollection.GlobalProjectCollection, 677ProjectCollection.GlobalProjectCollection, 720ProjectCollection.GlobalProjectCollection, 806ProjectCollection.GlobalProjectCollection, 869ProjectCollection.GlobalProjectCollection, 938ProjectCollection.GlobalProjectCollection, 981ProjectCollection.GlobalProjectCollection, 1053ProjectCollection.GlobalProjectCollection, 1093ProjectCollection.GlobalProjectCollection, 1164ProjectCollection.GlobalProjectCollection, 1211ProjectCollection.GlobalProjectCollection,
Construction\WhiteSpacePreservation_Tests.cs (1)
472var projectElement = ProjectRootElement.Open(file, ProjectCollection.GlobalProjectCollection, true);
Definition\Project_Tests.cs (7)
54ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 62ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 63ProjectCollection.GlobalProjectCollection.Count.ShouldBe(0); 65IDictionary<string, string> globalProperties = ProjectCollection.GlobalProjectCollection.GlobalProperties; 68ProjectCollection.GlobalProjectCollection.RemoveGlobalProperty(propertyName); 71ProjectCollection.GlobalProjectCollection.GlobalProperties.ShouldBeEmpty(); 2058ProjectCollection.GlobalProjectCollection.RegisterLogger(mockLogger);
Definition\ProjectCollection_Tests.cs (50)
36ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 44ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 45Assert.Equal(0, ProjectCollection.GlobalProjectCollection.Count); 47IDictionary<string, string> globalProperties = ProjectCollection.GlobalProjectCollection.GlobalProperties; 50ProjectCollection.GlobalProjectCollection.RemoveGlobalProperty(propertyName); 53Assert.Empty(ProjectCollection.GlobalProjectCollection.GlobalProperties); 72Project project2 = ProjectCollection.GlobalProjectCollection.LoadProject(path); 96Assert.Equal(0, ProjectCollection.GlobalProjectCollection.Count); 101Project project2 = ProjectCollection.GlobalProjectCollection.LoadProject(path); 150Project project2 = ProjectCollection.GlobalProjectCollection.LoadProject("c:\\x"); 302Assert.Equal(0, ProjectCollection.GlobalProjectCollection.Count); 304ProjectCollection.GlobalProjectCollection.LoadProject(path); 306Assert.Equal(1, ProjectCollection.GlobalProjectCollection.Count); 390ProjectCollection.GlobalProjectCollection.SetGlobalProperty("Configuration", "Debug"); 397ProjectCollection.GlobalProjectCollection.LoadProject("c:\\1", globals, null); 399Assert.Equal(1, ProjectCollection.GlobalProjectCollection.Count); 425Assert.True(ReferenceEquals(project1, ProjectCollection.GlobalProjectCollection.LoadProject(projectDirectory, globalProperties1, ObjectModelHelpers.MSBuildDefaultToolsVersion))); 426Assert.True(ReferenceEquals(project2, ProjectCollection.GlobalProjectCollection.LoadProject(projectDirectory, globalProperties2, ObjectModelHelpers.MSBuildDefaultToolsVersion))); 428List<Project> projects = Helpers.MakeList(ProjectCollection.GlobalProjectCollection.LoadedProjects); 431Assert.Equal(2, ProjectCollection.GlobalProjectCollection.Count); 447ProjectCollection.GlobalProjectCollection.SetGlobalProperty("Configuration", "Debug"); 458Project project2 = ProjectCollection.GlobalProjectCollection.LoadProject("c:\\1", project2Globals, null); 464ProjectCollection.GlobalProjectCollection.SetGlobalProperty("Platform", "X64"); 473ProjectCollection.GlobalProjectCollection.SetGlobalProperty("Configuration", "Debug2"); 474ProjectCollection.GlobalProjectCollection.SetGlobalProperty("Platform", "X86"); 480ProjectCollection.GlobalProjectCollection.SetGlobalProperty("MyProperty", "MyValue2"); 513Assert.True(ReferenceEquals(project1, ProjectCollection.GlobalProjectCollection.LoadProject("c:\\1", null, "2.0"))); 514Assert.True(ReferenceEquals(project2, ProjectCollection.GlobalProjectCollection.LoadProject("c:\\1", null, ObjectModelHelpers.MSBuildDefaultToolsVersion))); 534Project project2 = ProjectCollection.GlobalProjectCollection.LoadProject("c:\\123.proj", null, null); 556Project project2 = ProjectCollection.GlobalProjectCollection.LoadProject("c:\\123.proj", null, null); 700Assert.Equal(1, ProjectCollection.GlobalProjectCollection.Count); 702ProjectCollection.GlobalProjectCollection.UnloadProject(project); // should not throw 704Assert.Equal(0, ProjectCollection.GlobalProjectCollection.Count); 705Assert.Empty(Helpers.MakeList(ProjectCollection.GlobalProjectCollection.LoadedProjects)); 718ProjectCollection.GlobalProjectCollection.UnloadProject(project); 719ProjectCollection.GlobalProjectCollection.UnloadProject(xml); 726ProjectCollection.GlobalProjectCollection.LoadProject(xml.FullPath); 745ProjectCollection.GlobalProjectCollection.UnloadProject(project.Xml); 767ProjectCollection.GlobalProjectCollection.UnloadProject(importProject); 772ProjectCollection.GlobalProjectCollection.UnloadProject(importedXml); 792Assert.Equal(1, ProjectCollection.GlobalProjectCollection.Count); 794Assert.True(ReferenceEquals(project, Helpers.MakeList(ProjectCollection.GlobalProjectCollection.LoadedProjects)[0])); 796ProjectCollection.GlobalProjectCollection.UnloadProject(project); // should not throw 798Assert.Equal(0, ProjectCollection.GlobalProjectCollection.Count); 811ProjectCollection.GlobalProjectCollection.SetGlobalProperty("Configuration", "Debug"); 1019ProjectCollection.GlobalProjectCollection.AddToolset(null); 1063ProjectCollection.GlobalProjectCollection.RemoveToolset(null); 1075ProjectCollection.GlobalProjectCollection.RemoveToolset(String.Empty); 1123ProjectCollection.GlobalProjectCollection.DefaultToolsVersion = String.Empty; 1135ProjectCollection.GlobalProjectCollection.DefaultToolsVersion = "nonexistent";
Definition\ProjectProperty_Tests.cs (1)
194Project project = new Project(globalProperties, null, ProjectCollection.GlobalProjectCollection);
Instance\ProjectInstance_Tests.cs (1)
1030using ProjectFromString projectFromString = new(content, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, ProjectCollection.GlobalProjectCollection);
Microsoft.Build.Engine.UnitTests (54)
BackEnd\BuildManager_Tests.cs (3)
3130new BuildParameters(ProjectCollection.GlobalProjectCollection) 3208new BuildParameters(ProjectCollection.GlobalProjectCollection) 3293new BuildParameters(ProjectCollection.GlobalProjectCollection)
BackEnd\ConfigurationMetadata_Tests.cs (1)
29ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
BackEnd\MSBuild_Tests.cs (2)
27ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 32ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
BackEnd\TargetUpToDateChecker_Tests.cs (2)
40ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 629ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
BackEnd\TaskRegistry_Tests.cs (2)
2183? new TaskRegistry(toolset, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache) 2184: new TaskRegistry(ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
Construction\SolutionFilter_Tests.cs (1)
40ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
Construction\SolutionProjectGenerator_Tests.cs (7)
55ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 442Toolset t = ProjectCollection.GlobalProjectCollection.GetToolset(instances[0].ToolsVersion); 1898Assert.Empty(ProjectCollection.GlobalProjectCollection.LoadedProjects); 1902Assert.Empty(ProjectCollection.GlobalProjectCollection.LoadedProjects); 1920ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 1955Assert.Empty(ProjectCollection.GlobalProjectCollection.LoadedProjects); 1960Assert.Empty(ProjectCollection.GlobalProjectCollection.LoadedProjects);
Definition\Project_Internal_Tests.cs (1)
96Project project2 = ProjectCollection.GlobalProjectCollection.LoadProject("c:\\123.proj", null, null);
Definition\Toolset_Tests.cs (1)
171Toolset t = ProjectCollection.GlobalProjectCollection.GetToolset("4.0");
Definition\ToolsVersion_Tests.cs (4)
170TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(loggingContext, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache); 200TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(loggingContext, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache); 223TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(loggingContext, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache); 938TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(loggingContext, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
EscapingInProjects_Tests.cs (1)
81ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
Evaluation\EvaluationLogging_Tests.cs (2)
28ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 37ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
Evaluation\Evaluator_Tests.cs (3)
40ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 49ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 1362ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
Evaluation\ItemEvaluation_Tests.cs (2)
30ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 39ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
Evaluation\Preprocessor_Tests.cs (1)
37ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
Evaluation\ProjectRootElementCache_Tests.cs (8)
30ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 40ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 52ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.Get("c:\\foo", (p, c) => null, true, false); 63ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.Get("c:\\foo", (p, c) => ProjectRootElement.Create("c:\\bar"), true, false); 74ProjectRootElement projectRootElement2 = ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.Get(rootedPath, (p, c) => { throw new InvalidOperationException(); }, true, false); 91projectRootElement = ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.Get(projectPath, (p, c) => { throw new InvalidOperationException(); }, true, false); 95ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.DiscardStrongReferences(); 99Assert.Null(ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.TryGet(projectPath));
Evaluation\SimpleProjectRootElementCache_Tests.cs (2)
21ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 27ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
Graph\ProjectGraph_Tests.cs (2)
107ProjectCollection.GlobalProjectCollection, 209ProjectCollection.GlobalProjectCollection,
Instance\HostServices_Tests.cs (7)
32ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 408ProjectCollection.GlobalProjectCollection.HostServices = hostServices; 413ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 427ProjectCollection.GlobalProjectCollection.HostServices = hostServices; 433ProjectCollection.GlobalProjectCollection.UnloadProject(project1); 437ProjectCollection.GlobalProjectCollection.UnloadProject(project2); 508ProjectCollection.GlobalProjectCollection.LoadProject(
Instance\ProjectInstance_Internal_Tests.cs (2)
288using ProjectRootElementFromString projectRootElementFromString = new("<Project></Project>", ProjectCollection.GlobalProjectCollection, false, false); 968using ProjectFromString projectFromString = new(content, globalProperties, toolsVersion ?? ObjectModelHelpers.MSBuildDefaultToolsVersion, projectCollection ?? ProjectCollection.GlobalProjectCollection);
Microsoft.Build.Tasks.UnitTests (6)
CallTarget_Tests.cs (2)
21ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 26ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
CreateProperty_Tests.cs (2)
16ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 21ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
MSBuild_Tests.cs (2)
29ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 34ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
Microsoft.Build.UnitTests.Shared (2)
ProjectFromString.cs (2)
27: this(s, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 55: this(s, ProjectCollection.GlobalProjectCollection)
Microsoft.Build.Utilities.UnitTests (7)
MuxLogger_Tests.cs (5)
58BuildParameters parameters = new BuildParameters(ProjectCollection.GlobalProjectCollection); 153BuildParameters parameters = new BuildParameters(ProjectCollection.GlobalProjectCollection); 207BuildParameters parameters = new BuildParameters(ProjectCollection.GlobalProjectCollection); 262BuildParameters parameters = new BuildParameters(ProjectCollection.GlobalProjectCollection); 311BuildParameters parameters = new BuildParameters(ProjectCollection.GlobalProjectCollection);
ToolLocationHelper_Tests.cs (2)
692string tv12path = Path.Combine(ProjectCollection.GlobalProjectCollection.GetToolset(ObjectModelHelpers.MSBuildDefaultToolsVersion).ToolsPath, MSBuildExeName); 714var toolsPath32 = ProjectCollection.GlobalProjectCollection.GetToolset(ObjectModelHelpers.MSBuildDefaultToolsVersion).Properties["MSBuildToolsPath32"];
Roslyn.Compilers.Extension (3)
CompilerPackage.cs (3)
55Microsoft.Build.Evaluation.ProjectCollection.GlobalProjectCollection.DisableMarkDirty = true; 56Microsoft.Build.Evaluation.ProjectCollection.GlobalProjectCollection.SetGlobalProperty("RoslynHive", RoslynHive); 60Microsoft.Build.Evaluation.ProjectCollection.GlobalProjectCollection.DisableMarkDirty = false;