231 instantiations of ProjectCollection
Microsoft.Build (2)
Construction\Solution\SolutionProjectGenerator.cs (1)
1000new ProjectCollection(),
Definition\ProjectCollection.cs (1)
434var local = new ProjectCollection(null, null, null, ToolsetDefinitionLocations.Default,
Microsoft.Build.Engine.OM.UnitTests (84)
Construction\ProjectRootElement_Tests.cs (7)
522ProjectCollection projectCollection = new ProjectCollection(); 1020var collection = new ProjectCollection(); 1091var collection = new ProjectCollection(); 1278using (var projectCollection = new ProjectCollection()) 1932ProjectRootElement project = ProjectRootElement.Open(projectFullPath, new ProjectCollection()); 1947project = ProjectRootElement.Open(projectFullPath, new ProjectCollection()); 1964ProjectRootElement project = ProjectRootElement.Open(projectFullPath, new ProjectCollection());
Construction\ProjectTargetElement_Tests.cs (1)
363ProjectCollection collection = new ProjectCollection();
Definition\Project_Tests.cs (31)
134ProjectCollection collection = new ProjectCollection(); 161ProjectCollection collection = new ProjectCollection(); 276Project project = (new ProjectCollection()).LoadProject(reader); 369Project project = new Project(xml, null, null, new ProjectCollection(), ProjectLoadSettings.IgnoreMissingImports); 385Project project = new Project(xml, null, null, new ProjectCollection(), ProjectLoadSettings.IgnoreMissingImports); 400ProjectCollection collection = new ProjectCollection(); 430ProjectCollection collection = new ProjectCollection(); 466ProjectCollection collection = new ProjectCollection(); 503ProjectCollection collection = new ProjectCollection(); 981ProjectCollection collection = new ProjectCollection(initial, null, ToolsetDefinitionLocations.ConfigurationFile); 1222Project p = new Project(GetSampleProjectRootElement(), null, ObjectModelHelpers.MSBuildDefaultToolsVersion, new ProjectCollection()); 1251Project p = new Project(GetSampleProjectRootElement(), null, ObjectModelHelpers.MSBuildDefaultToolsVersion, new ProjectCollection()); 1278Project p = new Project(GetSampleProjectRootElement(), globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, new ProjectCollection()); 1309Project p = new Project(GetSampleProjectRootElement(), globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", new ProjectCollection(projectCollectionGlobalProperties), ProjectLoadSettings.Default); 1430using (var projectCollection = new ProjectCollection()) 1494using (var projectCollection = new ProjectCollection()) 1578using (var projectCollection = new ProjectCollection()) 2390Project project = new Project(globalProperties, null, new ProjectCollection()); 2409ProjectCollection collection = new ProjectCollection(globalProperties, loggers, ToolsetDefinitionLocations.None); 2433ProjectCollection collection = new ProjectCollection(globalProperties, loggers, ToolsetDefinitionLocations.None); 2503ProjectCollection collection = new ProjectCollection(globalProperties, loggers, ToolsetDefinitionLocations.None); 3539using (var projectCollection = new ProjectCollection()) 3809using (var projectCollection = new ProjectCollection()) 3861using (ProjectCollection collection = new ProjectCollection()) 3910using (ProjectCollection collection = new ProjectCollection()) 3954using (ProjectCollection collection = new ProjectCollection()) 4001using (ProjectCollection collection = new ProjectCollection()) 4041using (ProjectCollection collection = new ProjectCollection()) 4084using (ProjectCollection collection = new ProjectCollection()) 4127using (ProjectCollection collection = new ProjectCollection()) 4165using (ProjectCollection collection = new ProjectCollection())
Definition\ProjectCollection_Tests.cs (36)
124ProjectCollection collection = new ProjectCollection(); 166var collection = new ProjectCollection(); 197ProjectCollection collection = new ProjectCollection(); 228ProjectCollection collection = new ProjectCollection(); 251var collection = new ProjectCollection(); 267var collection = new ProjectCollection(); 281var collection = new ProjectCollection(); 325var collection = new ProjectCollection(); 346ProjectCollection collection1 = new ProjectCollection(); 352ProjectCollection collection2 = new ProjectCollection(); 564ProjectCollection collection = new ProjectCollection(); 581var collection = new ProjectCollection(); 608var collection = new ProjectCollection(); 630var collection = new ProjectCollection(); 675var collection = new ProjectCollection(); 834ProjectCollection collection = new ProjectCollection(); 874var collection = new ProjectCollection(); 917var collection = new ProjectCollection(); 947var collection = new ProjectCollection(); 967var collection = new ProjectCollection(); 991var collection = new ProjectCollection(); 1025var collection = new ProjectCollection(); 1047var collection = new ProjectCollection(); 1087var collection = new ProjectCollection(); 1107var collection = new ProjectCollection(null, null, ToolsetDefinitionLocations.Registry); 1141var collection = new ProjectCollection(); 1169var collection = new ProjectCollection(); 1261var collection = new ProjectCollection(); 1270collection = new ProjectCollection(); 1279collection = new ProjectCollection(); 1288collection = new ProjectCollection(); 1297collection = new ProjectCollection(); 1307collection = new ProjectCollection(); 1315collection = new ProjectCollection(); 1327var collection = new ProjectCollection(); 1386var collection = new ProjectCollection();
Definition\ProjectItem_Tests.cs (5)
832ProjectCollection projectCollection = new ProjectCollection(); 960options.ProjectCollection = new ProjectCollection(); 1151using (var projectCollection = new ProjectCollection()) 1171using (var projectCollection = new ProjectCollection()) 3741using (var projectCollection = new ProjectCollection())
Instance\ProjectInstance_Tests.cs (3)
418var pc = new ProjectCollection(); 454var pc = new ProjectCollection(); 496var pc = new ProjectCollection();
ObjectModelRemoting\RemoteProjectsProviderMock\ExporterMock.cs (1)
158this.Collection = new ProjectCollection();
Microsoft.Build.Engine.UnitTests (120)
BackEnd\BuildManager_Logging_Tests.cs (1)
76_projectCollection = new ProjectCollection();
BackEnd\BuildManager_Tests.cs (6)
85_projectCollection = new ProjectCollection(); 345var projectCollection = new ProjectCollection(); 878var projectCollection = new ProjectCollection(); 1976var projectCollection2 = new ProjectCollection(); 2035var projectCollection = new ProjectCollection(); 3623using (var collection = new ProjectCollection())
BackEnd\BuildRequestConfiguration_Tests.cs (3)
281new ProjectCollection()); 357new ProjectCollection()); 457Project project = new Project(XmlReader.Create(new StringReader(projectBody)), globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, new ProjectCollection());
BackEnd\MSBuild_Tests.cs (1)
1561ProjectCollection pc = new ProjectCollection(null, new List<ILogger> { logger }, null, ToolsetDefinitionLocations.Default, 2, false);
BackEnd\SdkResultOutOfProc_Tests.cs (1)
65_projectCollection = new ProjectCollection();
BackEnd\TargetEntry_Tests.cs (1)
856ProjectCollection collection = new ProjectCollection();
BackEnd\TaskBuilder_Tests.cs (1)
145ProjectCollection collection = new ProjectCollection();
BinaryLogger_Tests.cs (2)
122using (ProjectCollection collection = new()) 218using (ProjectCollection collection = new())
ChangeWaves_Tests.cs (1)
61ProjectCollection collection = new ProjectCollection();
Construction\SolutionProjectGenerator_Tests.cs (2)
1884ProjectCollection collection = new ProjectCollection(); 2228ProjectCollection collection = new ProjectCollection();
Definition\Project_Internal_Tests.cs (1)
42ProjectCollection collection = new ProjectCollection();
Definition\Toolset_Tests.cs (27)
28Toolset t = new Toolset(null, "x", new ProjectCollection(), null); 37Toolset t = new Toolset("x", null, new ProjectCollection(), null); 46Toolset t = new Toolset(String.Empty, "x", new ProjectCollection(), null); 57t = new Toolset("x", "C:", new ProjectCollection(), null); 59t = new Toolset("x", @"C:\", new ProjectCollection(), null); 61t = new Toolset("x", @"C:\\", new ProjectCollection(), null); 64t = new Toolset("x", @"C:\foo", new ProjectCollection(), null); 66t = new Toolset("x", @"C:\foo\", new ProjectCollection(), null); 68t = new Toolset("x", @"C:\foo\\", new ProjectCollection(), null); 71t = new Toolset("x", @"\\foo\share", new ProjectCollection(), null); 73t = new Toolset("x", @"\\foo\share\", new ProjectCollection(), null); 75t = new Toolset("x", @"\\foo\share\\", new ProjectCollection(), null); 80t = new Toolset("x", "/", new ProjectCollection(), null); 83t = new Toolset("x", "/foo", new ProjectCollection(), null); 85t = new Toolset("x", "/foo/", new ProjectCollection(), null); 87t = new Toolset("x", "/foo//", new ProjectCollection(), null); 90t = new Toolset("x", @"\\foo\share", new ProjectCollection(), null); 92t = new Toolset("x", @"\\foo\share/", new ProjectCollection(), null); 94t = new Toolset("x", @"\\foo\share//", new ProjectCollection(), null); 207ProjectCollection projectCollection = new ProjectCollection(); 241ProjectCollection projectCollection = new ProjectCollection(); 275ProjectCollection projectCollection = new ProjectCollection(globalProperties); 297ProjectCollection projectCollection = new ProjectCollection(); 319ProjectCollection projectCollection = new ProjectCollection(); 347ProjectCollection projectCollection = new ProjectCollection(globalProperties); 463ProjectCollection projectCollection = new ProjectCollection(globalProperties); 516ProjectCollection projectCollection = new ProjectCollection(globalPropertiesForProjectCollection);
Definition\ToolsetConfigurationReader_Tests.cs (1)
665return new ToolsetConfigurationReader(new ProjectCollection().EnvironmentProperties, new PropertyDictionary<ProjectPropertyInstance>(), ToolsetConfigurationReaderTestHelper.ReadApplicationConfigurationTest);
Definition\ToolsVersion_Tests.cs (27)
32ProjectCollection e = new ProjectCollection(); 35Toolset t = new Toolset("toolsversionname", dir, new PropertyDictionary<ProjectPropertyInstance>(), new ProjectCollection(), new DirectoryGetFiles(this.getFiles), new LoadXmlFromPath(this.loadXmlFromPath), overrideDir, new DirectoryExists(this.directoryExists)); 76ProjectCollection e = new ProjectCollection(); 77Toolset t = new Toolset("toolsversionname", "c:\\directory1\\directory2", new PropertyDictionary<ProjectPropertyInstance>(), new ProjectCollection(), new DirectoryGetFiles(this.getFiles), new LoadXmlFromPath(this.loadXmlFromPath), "msbuildoverridetasks", new DirectoryExists(this.directoryExists)); 93ProjectCollection e = new ProjectCollection(); 94Toolset t = new Toolset("toolsversionname", "c:\\directory1\\directory2", new PropertyDictionary<ProjectPropertyInstance>(), new ProjectCollection(), new DirectoryGetFiles(this.getFiles), new LoadXmlFromPath(this.loadXmlFromPath), "k:\\||^%$#*msbuildoverridetasks", new DirectoryExists(this.directoryExists)); 110ProjectCollection e = new ProjectCollection(); 111Toolset t = new Toolset("toolsversionname", "c:\\directory1\\directory2", new PropertyDictionary<ProjectPropertyInstance>(), new ProjectCollection(), new DirectoryGetFiles(this.getFiles), new LoadXmlFromPath(this.loadXmlFromPath), tooLong, new DirectoryExists(this.directoryExists)); 128ProjectCollection e = new ProjectCollection(); 129Toolset t = new Toolset("toolsversionname", "c:\\directory1\\directory2", new PropertyDictionary<ProjectPropertyInstance>(), new ProjectCollection(), new DirectoryGetFiles(this.getFiles), new LoadXmlFromPath(this.loadXmlFromPath), "k:\\Thecatinthehat", new DirectoryExists(this.directoryExists)); 150new ProjectCollection(), 177ProjectCollection p = new ProjectCollection(); 182Toolset t = new Toolset("toolsversionname", "c:\\directory1\\directory2\\doesntexist", new PropertyDictionary<ProjectPropertyInstance>(), new ProjectCollection(), new DirectoryGetFiles(this.getFiles), new LoadXmlFromPath(this.loadXmlFromPath), null, new DirectoryExists(this.directoryExists)); 200ProjectCollection p = new ProjectCollection(); 220ProjectCollection p = new ProjectCollection(); 287ProjectCollection p = new ProjectCollection(); 322ProjectCollection p = new ProjectCollection(); 355ProjectCollection p = new ProjectCollection(); 383ProjectCollection p = new ProjectCollection(); 413ProjectCollection p = new ProjectCollection(); 516ProjectCollection p = new ProjectCollection(); 554ProjectCollection p = new ProjectCollection(); 594ProjectCollection p = new ProjectCollection(); 662ProjectCollection p = new ProjectCollection(); 746ProjectCollection p = new ProjectCollection(); 854ProjectCollection p = new ProjectCollection(); 891new ProjectCollection(),
EscapingInProjects_Tests.cs (1)
649Project project = new Project(projectElement, null, null, new ProjectCollection());
Evaluation\Evaluator_Tests.cs (25)
494ProjectCollection pc = new ProjectCollection(); 537ProjectCollection pc = new ProjectCollection(); 582ProjectCollection pc = new ProjectCollection(); 625ProjectCollection pc = new ProjectCollection(); 671ProjectCollection pc = new ProjectCollection(); 715ProjectCollection pc = new ProjectCollection(); 761ProjectCollection pc = new ProjectCollection(); 899ProjectCollection pc = new ProjectCollection(); 983ProjectCollection pc = new ProjectCollection(); 1043ProjectCollection pc = new ProjectCollection(); 2389Project project = new Project(new ProjectCollection()); 2422Project project = new Project(new ProjectCollection()); 2439Project project = new Project(new ProjectCollection()); 2495Project project = new Project(new ProjectCollection()); 2513Project project = new Project(new ProjectCollection()); 2568Project project = new Project(new ProjectCollection()); 2586Project project = new Project(new ProjectCollection()); 2623Project project = new Project(new ProjectCollection()); 2641Project project = new Project(new ProjectCollection()); 3030Project project = new Project(XmlReader.Create(new StringReader(content)), globalProperties, null, new ProjectCollection()); 4246Project project = new Project(null, ObjectModelHelpers.MSBuildDefaultToolsVersion, new ProjectCollection()); 4613new ProjectCollection( 4939ProjectCollection pc = new ProjectCollection(); 4980ProjectCollection pc = new(); 5044ProjectCollection projectCollection = new ProjectCollection(globalProperties);
Evaluation\ImportFromMSBuildExtensionsPath_Tests.cs (4)
28toolsVersionToUse = new ProjectCollection().DefaultToolsVersion; 982projColln = new ProjectCollection(ToolsetDefinitionLocations.ConfigurationFile); 990projColln = new ProjectCollection(globalProperties, loggers: null, ToolsetDefinitionLocations.ConfigurationFile); 1057return new ToolsetConfigurationReader(new ProjectCollection().EnvironmentProperties, new PropertyDictionary<ProjectPropertyInstance>(), ToolsetConfigurationReaderTestHelper.ReadApplicationConfigurationTest);
Evaluation\ProjectCollection_Tests.cs (2)
17var collectionWithDefaultCache = new ProjectCollection(); 25var collectionWithSimpleCache = new ProjectCollection();
Evaluation\ProjectStringCache_Tests.cs (1)
186ProjectCollection collection = new ProjectCollection();
Evaluation\ToolsetConfigurationNet5_Tests.cs (2)
29var projectCollection = new ProjectCollection(); 56var projectCollection = new ProjectCollection(ToolsetDefinitionLocations.ConfigurationFile);
EvaluationProfiler_Tests.cs (1)
279using (var projectCollection = new ProjectCollection())
FixPathOnUnix_Tests.cs (1)
44var projColln = new ProjectCollection();
Instance\ProjectInstance_Internal_Tests.cs (6)
298var projectCollection = new ProjectCollection(); 319ProjectInstance p = GetSampleProjectInstance(null, null, new ProjectCollection()); 352ProjectInstance p = GetSampleProjectInstance(null, null, new ProjectCollection()); 379ProjectInstance p = GetSampleProjectInstance(null, globalProperties, new ProjectCollection()); 418ProjectInstance p = new ProjectInstance(xml, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", new ProjectCollection(projectCollectionGlobalProperties)); 847ProjectCollection projectCollection = new ProjectCollection();
Utilities_Tests.cs (2)
314toolsets.Add(new Toolset("66", "x", new ProjectCollection(), null)); 315toolsets.Add(new Toolset("44", "y", new ProjectCollection(), null));
Microsoft.Build.Tasks.UnitTests (8)
AssignLinkMetadata_Tests.cs (1)
177Project p = new Project(new ProjectCollection())
Exec_Tests.cs (2)
951var collection = new ProjectCollection( 1008var collection = new ProjectCollection(
ResolveSDKReference_Tests.cs (5)
3811ProjectCollection pc = new ProjectCollection(); 3954ProjectCollection pc = new ProjectCollection(); 4063ProjectCollection pc = new ProjectCollection(); 4160ProjectCollection pc = new ProjectCollection(); 4329ProjectCollection pc = new ProjectCollection();
Microsoft.Build.UnitTests.Shared (9)
EngineTestEnvironment.cs (2)
216using (ProjectCollection projectCollection = new ProjectCollection()) 277Collection = new ProjectCollection();
MockEngine.cs (1)
40private readonly ProjectCollection _projectCollection = new ProjectCollection();
ObjectModelHelpers.cs (6)
141using (var collection = new ProjectCollection()) 667collection ?? new ProjectCollection(), 689return CreateInMemoryProject(new ProjectCollection(), xml, loggers); 768using ProjectCollection collection = new(); 796using ProjectCollection collection = new(); 979ProjectCollection projectCollection = new ProjectCollection();
Microsoft.Build.Utilities.UnitTests (4)
MuxLogger_Tests.cs (2)
94ProjectCollection projectCollection = new ProjectCollection(); 103projectCollection = new ProjectCollection();
ToolLocationHelper_Tests.cs (2)
3584ProjectCollection pc = new ProjectCollection(); 3656ProjectCollection pc = new ProjectCollection();
Microsoft.DotNet.Arcade.Sdk (1)
src\InstallDotNetCore.cs (1)
89var proj = Project.FromFile(VersionsPropsPath, new Build.Definition.ProjectOptions() { ProjectCollection = new ProjectCollection() });
MSBuild (2)
XMake.cs (2)
825using (ProjectCollection collection = new(globalProperties, loggers, ToolsetDefinitionLocations.Default)) 1374projectCollection = new ProjectCollection(
TaskUsageLogger (1)
TaskUsageLogger.cs (1)
75_privateCollection = new ProjectCollection();
556 references to ProjectCollection
dotnet-openapi (1)
Commands\BaseCommand.cs (1)
127var project = ProjectCollection.GlobalProjectCollection.LoadProject(
Microsoft.Build (123)
BackEnd\BuildManager\BuildManager.cs (3)
1076_buildTelemetry.Version = ProjectCollection.Version; 1077_buildTelemetry.DisplayVersion = ProjectCollection.DisplayVersion; 1915ProjectCollection.GlobalProjectCollection,
BackEnd\BuildManager\BuildParameters.cs (1)
241public BuildParameters(ProjectCollection projectCollection)
BackEnd\Components\Logging\LoggingService.cs (2)
1709while (log is ProjectCollection.ReusableLogger reusableLogger) 1755var innerLogger = (logger is ProjectCollection.ReusableLogger reusableLogger) ? reusableLogger.OriginalLogger : logger;
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
362SdkResolverContext context = new SdkResolverContext(buildEngineLogger, projectPath, solutionPath, ProjectCollection.Version, interactive, isRunningInVisualStudio)
BackEnd\Node\OutOfProcNode.cs (2)
735ProjectCollection.GlobalProjectCollection.RemoveAllToolsets(); 739ProjectCollection.GlobalProjectCollection.AddToolset(toolSet);
Construction\ProjectRootElement.cs (22)
383public string EscapedFullPath => _escapedFullPath ?? (_escapedFullPath = ProjectCollection.Escape(FullPath)); 721return Create(ProjectCollection.GlobalProjectCollection, Project.DefaultNewProjectTemplateOptions); 730return Create(ProjectCollection.GlobalProjectCollection, projectFileOptions); 737public static ProjectRootElement Create(ProjectCollection projectCollection) 743/// Initialize an in-memory, empty ProjectRootElement instance that can be saved later using the specified <see cref="ProjectCollection"/> and <see cref="NewProjectFileOptions"/>. 745public static ProjectRootElement Create(ProjectCollection projectCollection, NewProjectFileOptions projectFileOptions) 758return Create(path, ProjectCollection.GlobalProjectCollection, Project.DefaultNewProjectTemplateOptions); 767return Create(path, ProjectCollection.GlobalProjectCollection, newProjectFileOptions); 774public static ProjectRootElement Create(string path, ProjectCollection projectCollection) 783public static ProjectRootElement Create(string path, ProjectCollection projectCollection, NewProjectFileOptions newProjectFileOptions) 803return Create(xmlReader, ProjectCollection.GlobalProjectCollection, preserveFormatting: false); 811public static ProjectRootElement Create(XmlReader xmlReader, ProjectCollection projectCollection) 821public static ProjectRootElement Create(XmlReader xmlReader, ProjectCollection projectCollection, bool preserveFormatting) 836return Open(path, ProjectCollection.GlobalProjectCollection); 844public static ProjectRootElement Open(string path, ProjectCollection projectCollection) 854public static ProjectRootElement Open(string path, ProjectCollection projectCollection, bool? preserveFormatting) 878return TryOpen(path, ProjectCollection.GlobalProjectCollection); 886/// <param name="projectCollection">The <see cref="ProjectCollection"/> to load the project into.</param> 892public static ProjectRootElement TryOpen(string path, ProjectCollection projectCollection) 902/// <param name="projectCollection">The <see cref="ProjectCollection"/> to load the project into.</param> 911public static ProjectRootElement TryOpen(string path, ProjectCollection projectCollection, bool? preserveFormatting) 1775return new ProjectRootElement(document, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
Construction\Solution\SolutionProjectGenerator.cs (1)
22using ProjectCollection = Microsoft.Build.Evaluation.ProjectCollection;
Definition\Project.cs (26)
109internal Project(ProjectCollection projectCollection, ProjectLink link) 134: this(ProjectRootElement.Create(ProjectCollection.GlobalProjectCollection, newProjectFileOptions)) 143public Project(ProjectCollection projectCollection) 153public Project(ProjectCollection projectCollection, NewProjectFileOptions newProjectFileOptions) 166public Project(IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 180public Project(IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, NewProjectFileOptions newProjectFileOptions) 209: this(xml, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 224public Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 241public Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 259public Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 264private Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 303: this(xmlReader, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 318public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 335public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 353public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 358private Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 396: this(projectFile, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 412public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 430public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 449public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 454private Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 500options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 519options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 538options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 575public ProjectCollection ProjectCollection { get; } 1973private ProjectCollection ProjectCollection => Owner.ProjectCollection;
Definition\ProjectCollection.cs (4)
100private static ProjectCollection s_globalProjectCollection; 301/// <param name="useAsynchronousLogging">If set to true, asynchronous logging will be used. <see cref="ProjectCollection.Dispose()"/> has to called to clear resources used by async logging.</param> 426public static ProjectCollection GlobalProjectCollection 434var local = new ProjectCollection(null, null, null, ToolsetDefinitionLocations.Default,
Definition\ProjectCollectionChangedEventArgs.cs (9)
11/// Properties or other mutable state associated with a <see cref="ProjectCollection"/>. 16/// The <see cref="ProjectCollection.DefaultToolsVersion"/> property changed. 36/// The <see cref="ProjectCollection.IsBuildEnabled"/> property changed. 41/// The <see cref="ProjectCollection.OnlyLogCriticalEvents"/> property changed. 46/// The <see cref="ProjectCollection.HostServices"/> property changed. 51/// The <see cref="ProjectCollection.DisableMarkDirty"/> property changed. 56/// The <see cref="ProjectCollection.SkipEvaluation"/> property changed. 62/// Event arguments for the <see cref="ProjectCollection.ProjectCollectionChanged"/> event. 75/// Gets the nature of the change made to the <see cref="ProjectCollection"/>.
Definition\ProjectOptions.cs (2)
34/// The <see cref="ProjectCollection"/> the project is added to. Default is <see cref="ProjectCollection.GlobalProjectCollection"/>. 36public ProjectCollection ProjectCollection { get; set; }
Definition\Toolset.cs (4)
215public Toolset(string toolsVersion, string toolsPath, ProjectCollection projectCollection, string msbuildOverrideTasksPath) 231public Toolset(string toolsVersion, string toolsPath, IDictionary<string, string> buildProperties, ProjectCollection projectCollection, string msbuildOverrideTasksPath) 248public Toolset(string toolsVersion, string toolsPath, IDictionary<string, string> buildProperties, ProjectCollection projectCollection, IDictionary<string, SubToolset> subToolsets, string msbuildOverrideTasksPath) 348internal Toolset(string toolsVersion, string toolsPath, PropertyDictionary<ProjectPropertyInstance> buildProperties, ProjectCollection projectCollection, DirectoryGetFiles getFiles, LoadXmlFromPath loadXmlFromPath, string msbuildOverrideTasksPath, DirectoryExists directoryExists)
Evaluation\Evaluator.cs (2)
1119private static readonly string CachedFileVersion = ProjectCollection.Version.ToString(); 1137SetBuiltInProperty(ReservedPropertyNames.semanticVersion, ProjectCollection.DisplayVersion);
Evaluation\ProjectChangedEventArgs.cs (1)
12/// Event arguments for the <see cref="ProjectCollection.ProjectChanged"/> event.
Evaluation\ProjectXmlChangedEventArgs.cs (1)
14/// Event arguments for the <see cref="ProjectCollection.ProjectXmlChanged"/> event.
Graph\GraphBuilder.cs (3)
47private readonly ProjectCollection _projectCollection; 57ProjectCollection projectCollection, 598ProjectCollection projectCollection)
Graph\ProjectGraph.cs (19)
38/// <param name="projectCollection">The <see cref="ProjectCollection" /> context for parsing.</param> 58ProjectCollection projectCollection); 116: this(new ProjectGraphEntryPoint(entryProjectFile).AsEnumerable(), ProjectCollection.GlobalProjectCollection, null) 129: this(ProjectGraphEntryPoint.CreateEnumerable(entryProjectFiles), ProjectCollection.GlobalProjectCollection, null) 145public ProjectGraph(string entryProjectFile, ProjectCollection projectCollection) 162public ProjectGraph(IEnumerable<string> entryProjectFiles, ProjectCollection projectCollection) 188public ProjectGraph(string entryProjectFile, ProjectCollection projectCollection, ProjectInstanceFactoryFunc projectInstanceFactory) 206: this(new ProjectGraphEntryPoint(entryProjectFile, globalProperties).AsEnumerable(), ProjectCollection.GlobalProjectCollection, null) 223: this(ProjectGraphEntryPoint.CreateEnumerable(entryProjectFiles, globalProperties), ProjectCollection.GlobalProjectCollection, null) 243public ProjectGraph(string entryProjectFile, IDictionary<string, string> globalProperties, ProjectCollection projectCollection) 264public ProjectGraph(IEnumerable<string> entryProjectFiles, IDictionary<string, string> globalProperties, ProjectCollection projectCollection) 277: this(entryPoint.AsEnumerable(), ProjectCollection.GlobalProjectCollection, null) 289: this(entryPoints, ProjectCollection.GlobalProjectCollection, null) 304public ProjectGraph(ProjectGraphEntryPoint entryPoint, ProjectCollection projectCollection) 335ProjectCollection projectCollection, 375ProjectCollection projectCollection, 419ProjectCollection projectCollection, 838ProjectCollection projectCollection) 852ProjectCollection projectCollection,
Graph\ProjectInterpretation.cs (1)
81public IEnumerable<ReferenceInfo> GetReferences(ProjectGraphNode projectGraphNode, ProjectCollection projectCollection, ProjectGraph.ProjectInstanceFactoryFunc projectInstanceFactory)
Instance\ProjectInstance.cs (13)
218: this(projectFile, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 234public ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 252public ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection) 269internal ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, EvaluationContext context, bool interactive = false) 292private ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, 323: this(xml, null, null, ProjectCollection.GlobalProjectCollection) 339public ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 358public ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection) 510private ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, 585internal ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, int visualStudioVersionFromSolution, ProjectCollection projectCollection, ISdkResolverService sdkResolverService, int submissionId) 600internal ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, ILoggingService loggingService, int visualStudioVersionFromSolution, ProjectCollection projectCollection, ISdkResolverService sdkResolverService, int submissionId) 864options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 883options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection,
ObjectModelRemoting\ExternalProjectsProvider.cs (2)
29public virtual void Disconnected(ProjectCollection collection) { } 38public static void SetExternalProjectsProvider(ProjectCollection collection, ExternalProjectsProvider link)
ObjectModelRemoting\LinkedObjectFactory.cs (4)
32private LinkedObjectsFactory(ProjectCollection collection) 41public static LinkedObjectsFactory Get(ProjectCollection collection) 67public ProjectCollection Collection { get; } 72public static IReadOnlyCollection<Project> GetLocalProjects(ProjectCollection collection, string projectFile = null)
Microsoft.Build.CommandLine.UnitTests (1)
XMake_Tests.cs (1)
2611ProjectCollection.DisplayVersion, NativeMethodsShared.FrameworkName);
Microsoft.Build.Conversion.Core (21)
ProjectFileConverter.cs (21)
1427value = ProjectCollection.Escape(value); 2130configPropertyGroup.AddProperty(VSProjectAttributes.outputPath, ProjectCollection.Escape(outputPath)); 2160configPropertyGroup.AddProperty(VSProjectAttributes.documentationFile, ProjectCollection.Escape(documentationFile)); 2219ProjectCollection.Escape(configName) + XMakeProjectStrings.configplatformSeparator + 2220ProjectCollection.Escape(platform) + XMakeProjectStrings.configplatformSuffix; 2589newReferenceItem.AddMetadata(referenceAttribute.Name, ProjectCollection.Escape(referenceAttribute.Value)); 2637return referencesItemGroup.AddItem(XMakeProjectStrings.comReference, ProjectCollection.Escape(referenceName)); 2707return referencesItemGroup.AddItem(XMakeProjectStrings.projectReference, ProjectCollection.Escape(value)); 2775return referencesItemGroup.AddItem(XMakeProjectStrings.reference, ProjectCollection.Escape(assemblyName)); 3040importsItemGroup.AddItem(XMakeProjectStrings.import, ProjectCollection.Escape(importNamespace)); 3264newFileItem = filesItemGroup.AddItem(buildAction, ProjectCollection.Escape(relPath)); 3292newFileItem = filesItemGroup.AddItem(buildAction, ProjectCollection.Escape(linkPath)); 3293newFileItem.AddMetadata(XMakeProjectStrings.link, ProjectCollection.Escape(relPath)); 3300newFileItem.AddMetadata(fileAttribute.Name, ProjectCollection.Escape(fileAttribute.Value)); 3441ProjectCollection.Escape(relPath)); 3467ProjectCollection.Escape(webReferenceUrl)); 3468newFolderItem.AddMetadata(XMakeProjectStrings.relPath, ProjectCollection.Escape(relPath)); 3513ProjectCollection.Escape(relPath)); 3520newFolderItem.AddMetadata(folderAttribute.Name, ProjectCollection.Escape(folderAttribute.Value)); 3628startupServicesItemGroup.AddItem(XMakeProjectStrings.service, ProjectCollection.Escape(id)); 3821officeDocumentItemGroup.AddItem("None", ProjectCollection.Escape(officeDocumentPath));
Microsoft.Build.Engine.OM.UnitTests (170)
Construction\ProjectFormatting_Tests.cs (14)
36ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 112ProjectCollection.GlobalProjectCollection, 145ProjectCollection.GlobalProjectCollection, 178ProjectCollection.GlobalProjectCollection, 208ProjectCollection.GlobalProjectCollection, 235ProjectCollection.GlobalProjectCollection, 267ProjectCollection.GlobalProjectCollection, 303ProjectCollection.GlobalProjectCollection, 342ProjectRootElement xml = ProjectRootElement.Create(XmlReader.Create(new StringReader(content)), ProjectCollection.GlobalProjectCollection, 366ProjectCollection.GlobalProjectCollection, 391ProjectRootElement xml = ProjectRootElement.Open(file, ProjectCollection.GlobalProjectCollection, 418ProjectCollection.GlobalProjectCollection, 443ProjectRootElement xml = ProjectRootElement.Open(file, ProjectCollection.GlobalProjectCollection, 666var project = new Project(ProjectRootElement.Open(file, ProjectCollection.GlobalProjectCollection));
Construction\ProjectMetadataElement_Tests.cs (12)
553ProjectCollection.GlobalProjectCollection, 595ProjectCollection.GlobalProjectCollection, 668ProjectCollection.GlobalProjectCollection, 710ProjectCollection.GlobalProjectCollection, 794ProjectCollection.GlobalProjectCollection, 855ProjectCollection.GlobalProjectCollection, 922ProjectCollection.GlobalProjectCollection, 963ProjectCollection.GlobalProjectCollection, 1033ProjectCollection.GlobalProjectCollection, 1071ProjectCollection.GlobalProjectCollection, 1140ProjectCollection.GlobalProjectCollection, 1185ProjectCollection.GlobalProjectCollection,
Construction\ProjectRootElement_Tests.cs (8)
21using ProjectCollection = Microsoft.Build.Evaluation.ProjectCollection; 522ProjectCollection projectCollection = new ProjectCollection(); 1020var collection = new ProjectCollection(); 1091var collection = new ProjectCollection(); 1278using (var projectCollection = new ProjectCollection()) 1579var projectCollection1 = env.CreateProjectCollection().Collection; 1580var projectCollection2 = env.CreateProjectCollection().Collection; 1718var projectCollection = env.CreateProjectCollection().Collection;
Construction\ProjectTargetElement_Tests.cs (1)
363ProjectCollection collection = new ProjectCollection();
Construction\WhiteSpacePreservation_Tests.cs (1)
472var projectElement = ProjectRootElement.Open(file, ProjectCollection.GlobalProjectCollection, true);
Definition\DefinitionEditing_Tests.cs (6)
692ProjectCollection.Escape(paths[0]), 693ProjectCollection.Escape(paths[1])); 809ProjectCollection.Escape(paths[0]), 810ProjectCollection.Escape(paths[1])); 1111ProjectCollection.Escape(Path.Combine(directory, "i2.xxx"))); 1407ProjectCollection.Escape(Path.Combine(directory, "i2.xxx")));
Definition\Project_Tests.cs (34)
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(); 134ProjectCollection collection = new ProjectCollection(); 161ProjectCollection collection = new ProjectCollection(); 400ProjectCollection collection = new ProjectCollection(); 430ProjectCollection collection = new ProjectCollection(); 466ProjectCollection collection = new ProjectCollection(); 503ProjectCollection collection = new ProjectCollection(); 981ProjectCollection collection = new ProjectCollection(initial, null, ToolsetDefinitionLocations.ConfigurationFile); 1430using (var projectCollection = new ProjectCollection()) 1494using (var projectCollection = new ProjectCollection()) 1578using (var projectCollection = new ProjectCollection()) 2036ProjectCollection.GlobalProjectCollection.RegisterLogger(mockLogger); 2409ProjectCollection collection = new ProjectCollection(globalProperties, loggers, ToolsetDefinitionLocations.None); 2433ProjectCollection collection = new ProjectCollection(globalProperties, loggers, ToolsetDefinitionLocations.None); 2503ProjectCollection collection = new ProjectCollection(globalProperties, loggers, ToolsetDefinitionLocations.None); 3219var projectCollection = env.CreateProjectCollection().Collection; 3247var projectCollection = env.CreateProjectCollection().Collection; 3539using (var projectCollection = new ProjectCollection()) 3733var projectCollection = env.CreateProjectCollection().Collection; 3809using (var projectCollection = new ProjectCollection()) 3829var projectCollection = env.CreateProjectCollection().Collection; 3861using (ProjectCollection collection = new ProjectCollection()) 3910using (ProjectCollection collection = new ProjectCollection()) 3954using (ProjectCollection collection = new ProjectCollection()) 4001using (ProjectCollection collection = new ProjectCollection()) 4041using (ProjectCollection collection = new ProjectCollection()) 4084using (ProjectCollection collection = new ProjectCollection()) 4127using (ProjectCollection collection = new ProjectCollection()) 4165using (ProjectCollection collection = new ProjectCollection())
Definition\ProjectCollection_Tests.cs (84)
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); 124ProjectCollection collection = new ProjectCollection(); 150Project project2 = ProjectCollection.GlobalProjectCollection.LoadProject("c:\\x"); 166var collection = new ProjectCollection(); 197ProjectCollection collection = new ProjectCollection(); 228ProjectCollection collection = new ProjectCollection(); 251var collection = new ProjectCollection(); 267var collection = new ProjectCollection(); 281var collection = new ProjectCollection(); 302Assert.Equal(0, ProjectCollection.GlobalProjectCollection.Count); 304ProjectCollection.GlobalProjectCollection.LoadProject(path); 306Assert.Equal(1, ProjectCollection.GlobalProjectCollection.Count); 325var collection = new ProjectCollection(); 346ProjectCollection collection1 = new ProjectCollection(); 352ProjectCollection collection2 = new ProjectCollection(); 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))); 532Project project2 = ProjectCollection.GlobalProjectCollection.LoadProject("c:\\123.proj", null, null); 552Project project2 = ProjectCollection.GlobalProjectCollection.LoadProject("c:\\123.proj", null, null); 564ProjectCollection collection = new ProjectCollection(); 581var collection = new ProjectCollection(); 608var collection = new ProjectCollection(); 630var collection = new ProjectCollection(); 675var collection = new ProjectCollection(); 696Assert.Equal(1, ProjectCollection.GlobalProjectCollection.Count); 698ProjectCollection.GlobalProjectCollection.UnloadProject(project); // should not throw 700Assert.Equal(0, ProjectCollection.GlobalProjectCollection.Count); 701Assert.Empty(Helpers.MakeList(ProjectCollection.GlobalProjectCollection.LoadedProjects)); 714ProjectCollection.GlobalProjectCollection.UnloadProject(project); 715ProjectCollection.GlobalProjectCollection.UnloadProject(xml); 722ProjectCollection.GlobalProjectCollection.LoadProject(xml.FullPath); 741ProjectCollection.GlobalProjectCollection.UnloadProject(project.Xml); 763ProjectCollection.GlobalProjectCollection.UnloadProject(importProject); 768ProjectCollection.GlobalProjectCollection.UnloadProject(importedXml); 788Assert.Equal(1, ProjectCollection.GlobalProjectCollection.Count); 790Assert.True(ReferenceEquals(project, Helpers.MakeList(ProjectCollection.GlobalProjectCollection.LoadedProjects)[0])); 792ProjectCollection.GlobalProjectCollection.UnloadProject(project); // should not throw 794Assert.Equal(0, ProjectCollection.GlobalProjectCollection.Count); 807ProjectCollection.GlobalProjectCollection.SetGlobalProperty("Configuration", "Debug"); 834ProjectCollection collection = new ProjectCollection(); 874var collection = new ProjectCollection(); 917var collection = new ProjectCollection(); 947var collection = new ProjectCollection(); 967var collection = new ProjectCollection(); 991var collection = new ProjectCollection(); 1015ProjectCollection.GlobalProjectCollection.AddToolset(null); 1025var collection = new ProjectCollection(); 1047var collection = new ProjectCollection(); 1059ProjectCollection.GlobalProjectCollection.RemoveToolset(null); 1071ProjectCollection.GlobalProjectCollection.RemoveToolset(String.Empty); 1087var collection = new ProjectCollection(); 1107var collection = new ProjectCollection(null, null, ToolsetDefinitionLocations.Registry); 1119ProjectCollection.GlobalProjectCollection.DefaultToolsVersion = String.Empty; 1131ProjectCollection.GlobalProjectCollection.DefaultToolsVersion = "nonexistent"; 1141var collection = new ProjectCollection(); 1169var collection = new ProjectCollection(); 1261var collection = new ProjectCollection(); 1327var collection = new ProjectCollection(); 1386var collection = new ProjectCollection(); 1448ProjectCollection.Version.Major.ShouldBe(expectedVersion.Major); 1449ProjectCollection.Version.Minor.ShouldBe(expectedVersion.Minor); 1476private static void VerifyProjectCollectionEvents(ProjectCollection collection, bool expectEventRaised, string propertyValue) 1493Assert.Equal(ProjectCollection.Unescape(propertyValue), property.EvaluatedValue);
Definition\ProjectItem_Tests.cs (4)
832ProjectCollection projectCollection = new ProjectCollection(); 1151using (var projectCollection = new ProjectCollection()) 1171using (var projectCollection = new ProjectCollection()) 3741using (var projectCollection = new ProjectCollection())
Definition\ProjectProperty_Tests.cs (1)
194Project project = new Project(globalProperties, null, ProjectCollection.GlobalProjectCollection);
Instance\ProjectInstance_Tests.cs (3)
418var pc = new ProjectCollection(); 454var pc = new ProjectCollection(); 496var pc = new ProjectCollection();
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (1)
469public static void VerifyProjectCollectionLinks(this ProjectCollection collection, string path, int expectedLocal, int expectedLinks)
ObjectModelRemoting\RemoteProjectsProviderMock\ExporterMock.cs (1)
179public ProjectCollection Collection { get; }
Microsoft.Build.Engine.UnitTests (193)
BackEnd\BuildManager_Logging_Tests.cs (1)
60private readonly ProjectCollection _projectCollection;
BackEnd\BuildManager_Tests.cs (13)
58private readonly ProjectCollection _projectCollection; 345var projectCollection = new ProjectCollection(); 878var projectCollection = new ProjectCollection(); 1976var projectCollection2 = new ProjectCollection(); 2035var projectCollection = new ProjectCollection(); 3065new BuildParameters(ProjectCollection.GlobalProjectCollection) 3143new BuildParameters(ProjectCollection.GlobalProjectCollection) 3228new BuildParameters(ProjectCollection.GlobalProjectCollection) 3509private ProjectInstance CreateProjectInstance(string contents, string toolsVersion, ProjectCollection projectCollection, bool deleteTempProject) 3518private ProjectGraph CreateProjectGraph(string contents, ProjectCollection projectCollection) 3529private Project CreateProject(string contents, string toolsVersion, ProjectCollection projectCollection, bool deleteTempProject) 3552private static ProjectInstance GenerateDummyProjects(string shutdownProjectDirectory, int parallelProjectCount, ProjectCollection projectCollection) 3623using (var collection = new ProjectCollection())
BackEnd\BuildRequestConfiguration_Tests.cs (1)
551var projectCollection = _env.CreateProjectCollection().Collection;
BackEnd\ConfigurationMetadata_Tests.cs (1)
29ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
BackEnd\LoggingService_Tests.cs (11)
338LoggerDescription description = CreateLoggerDescription(className, typeof(ProjectCollection).GetTypeInfo().Assembly.FullName, true); 355LoggerDescription configurableDescription = CreateLoggerDescription(configurableClassName, typeof(ProjectCollection).GetTypeInfo().Assembly.FullName, true); 356LoggerDescription distributedDescription = CreateLoggerDescription(distributedClassName, typeof(ProjectCollection).GetTypeInfo().Assembly.FullName, true); 392LoggerDescription configurableDescriptionA = CreateLoggerDescription(configurableClassNameA, typeof(ProjectCollection).GetTypeInfo().Assembly.FullName, true); 393LoggerDescription configurableDescriptionB = CreateLoggerDescription(configurableClassNameB, typeof(ProjectCollection).GetTypeInfo().Assembly.FullName, true); 437LoggerDescription description = CreateLoggerDescription(className, typeof(ProjectCollection).GetTypeInfo().Assembly.FullName, true); 465LoggerDescription description = CreateLoggerDescription(className, typeof(ProjectCollection).GetTypeInfo().Assembly.FullName, true); 530LoggerDescription description = CreateLoggerDescription(className, typeof(ProjectCollection).GetTypeInfo().Assembly.FullName, true); 553loggerDescriptions.Add(CreateLoggerDescription(configurableClassName, typeof(ProjectCollection).GetTypeInfo().Assembly.FullName, true)); 554loggerDescriptions.Add(CreateLoggerDescription(distributedClassName, typeof(ProjectCollection).GetTypeInfo().Assembly.FullName, true)); 615LoggerDescription description = CreateLoggerDescription(className, typeof(ProjectCollection).GetTypeInfo().Assembly.FullName, true);
BackEnd\MSBuild_Tests.cs (3)
27ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 32ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 1561ProjectCollection pc = new ProjectCollection(null, new List<ILogger> { logger }, null, ToolsetDefinitionLocations.Default, 2, false);
BackEnd\SdkResultOutOfProc_Tests.cs (2)
46private readonly ProjectCollection _projectCollection; 211private ProjectInstance CreateProjectInstance(string projectPath, string toolsVersion, ProjectCollection projectCollection)
BackEnd\TargetEntry_Tests.cs (1)
856ProjectCollection collection = new ProjectCollection();
BackEnd\TargetUpToDateChecker_Tests.cs (2)
40ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 588ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
BackEnd\TaskBuilder_Tests.cs (1)
145ProjectCollection collection = new ProjectCollection();
BackEnd\TaskRegistry_Tests.cs (2)
2182? new TaskRegistry(toolset, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache) 2183: new TaskRegistry(ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
BinaryLogger_Tests.cs (2)
122using (ProjectCollection collection = new()) 218using (ProjectCollection collection = new())
ChangeWaves_Tests.cs (1)
61ProjectCollection collection = new ProjectCollection();
Construction\SolutionFilter_Tests.cs (2)
35ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 122ProjectCollection projectCollection = testEnvironment.CreateProjectCollection().Collection;
Construction\SolutionProjectGenerator_Tests.cs (10)
24using ProjectCollection = Microsoft.Build.Evaluation.ProjectCollection; 53ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 428Toolset t = ProjectCollection.GlobalProjectCollection.GetToolset(instances[0].ToolsVersion); 1838Assert.Empty(ProjectCollection.GlobalProjectCollection.LoadedProjects); 1842Assert.Empty(ProjectCollection.GlobalProjectCollection.LoadedProjects); 1858ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 1884ProjectCollection collection = new ProjectCollection(); 1893Assert.Empty(ProjectCollection.GlobalProjectCollection.LoadedProjects); 1898Assert.Empty(ProjectCollection.GlobalProjectCollection.LoadedProjects); 2228ProjectCollection collection = new ProjectCollection();
Definition\Project_Internal_Tests.cs (6)
42ProjectCollection collection = new ProjectCollection(); 94Project project2 = ProjectCollection.GlobalProjectCollection.LoadProject("c:\\123.proj", null, null); 234var projectCollection = env.CreateProjectCollection().Collection; 271ProjectCollection projectCollection = testEnvironment.CreateProjectCollection().Collection; 299ProjectCollection projectCollection = testEnvironment.CreateProjectCollection().Collection; 327ProjectCollection projectCollection = testEnvironment.CreateProjectCollection().Collection;
Definition\ProjectEvaluationContext_Tests.cs (5)
104var projectCollection = _env.CreateProjectCollection().Collection; 146var projectCollection = _env.CreateProjectCollection().Collection; 201var collection = _env.CreateProjectCollection().Collection; 240var collection = _env.CreateProjectCollection().Collection; 985var collection = _env.CreateProjectCollection().Collection;
Definition\Toolset_Tests.cs (9)
180Toolset t = ProjectCollection.GlobalProjectCollection.GetToolset("4.0"); 207ProjectCollection projectCollection = new ProjectCollection(); 241ProjectCollection projectCollection = new ProjectCollection(); 275ProjectCollection projectCollection = new ProjectCollection(globalProperties); 297ProjectCollection projectCollection = new ProjectCollection(); 319ProjectCollection projectCollection = new ProjectCollection(); 347ProjectCollection projectCollection = new ProjectCollection(globalProperties); 463ProjectCollection projectCollection = new ProjectCollection(globalProperties); 516ProjectCollection projectCollection = new ProjectCollection(globalPropertiesForProjectCollection);
Definition\ToolsVersion_Tests.cs (23)
32ProjectCollection e = new ProjectCollection(); 76ProjectCollection e = new ProjectCollection(); 93ProjectCollection e = new ProjectCollection(); 110ProjectCollection e = new ProjectCollection(); 128ProjectCollection e = new ProjectCollection(); 156TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(null, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), ProjectCollection.GlobalProjectCollection.ProjectRootElementCache); 177ProjectCollection p = new ProjectCollection(); 184TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(service, BuildEventContext.Invalid, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache); 200ProjectCollection p = new ProjectCollection(); 206TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(service, BuildEventContext.Invalid, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache); 220ProjectCollection p = new ProjectCollection(); 287ProjectCollection p = new ProjectCollection(); 322ProjectCollection p = new ProjectCollection(); 355ProjectCollection p = new ProjectCollection(); 383ProjectCollection p = new ProjectCollection(); 413ProjectCollection p = new ProjectCollection(); 516ProjectCollection p = new ProjectCollection(); 554ProjectCollection p = new ProjectCollection(); 594ProjectCollection p = new ProjectCollection(); 662ProjectCollection p = new ProjectCollection(); 746ProjectCollection p = new ProjectCollection(); 854ProjectCollection p = new ProjectCollection(); 897TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(null, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
EscapingInProjects_Tests.cs (1)
81ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
Evaluation\EvaluationLogging_Tests.cs (3)
27ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 36ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 74var collection = env.CreateProjectCollection().Collection;
Evaluation\Evaluator_Tests.cs (31)
40ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 49ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 494ProjectCollection pc = new ProjectCollection(); 537ProjectCollection pc = new ProjectCollection(); 582ProjectCollection pc = new ProjectCollection(); 625ProjectCollection pc = new ProjectCollection(); 671ProjectCollection pc = new ProjectCollection(); 715ProjectCollection pc = new ProjectCollection(); 761ProjectCollection pc = new ProjectCollection(); 899ProjectCollection pc = new ProjectCollection(); 983ProjectCollection pc = new ProjectCollection(); 1043ProjectCollection pc = new ProjectCollection(); 1335ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 2684msbuildFileVersionProperty.ShouldBe(ProjectCollection.Version.ToString()); 2685ProjectCollection.Version.ToString().ShouldStartWith(msbuildVersionProperty, 2688msbuildSemanticVersionProperty.ShouldBe(ProjectCollection.DisplayVersion); 2689ProjectCollection.DisplayVersion.ShouldStartWith(msbuildVersionProperty, 3773ProjectCollection fakeProjectCollection = GetProjectCollectionWithFakeToolset(null /* no global properties */); 3838ProjectCollection fakeProjectCollection = GetProjectCollectionWithFakeToolset(null /* no global properties */); 3889ProjectCollection fakeProjectCollection = GetProjectCollectionWithFakeToolset(null /* no global properties */); 3940ProjectCollection fakeProjectCollection = GetProjectCollectionWithFakeToolset(null /* no global properties */); 3998ProjectCollection fakeProjectCollection = GetProjectCollectionWithFakeToolset(null /* no global properties */); 4055ProjectCollection fakeProjectCollection = GetProjectCollectionWithFakeToolset(null /* no project collection global properties */); 4114ProjectCollection fakeProjectCollection = GetProjectCollectionWithFakeToolset(null /* no project collection global properties */); 4165ProjectCollection fakeProjectCollection = GetProjectCollectionWithFakeToolset(null /* no project collection global properties */); 4211ProjectCollection fakeProjectCollection = GetProjectCollectionWithFakeToolset(null /* no project collection global properties */); 4899ProjectCollection fakeProjectCollection = 4939ProjectCollection pc = new ProjectCollection(); 4980ProjectCollection pc = new(); 5042private ProjectCollection GetProjectCollectionWithFakeToolset(IDictionary<string, string> globalProperties) 5044ProjectCollection projectCollection = new ProjectCollection(globalProperties);
Evaluation\ImportFromMSBuildExtensionsPath_Tests.cs (13)
53var projColln = GetProjectCollection(); 303var projColln = GetProjectCollection(); 406var projColln = GetProjectCollection(); 498var projColln = GetProjectCollection(); 575var projectCollection = GetProjectCollection(new Dictionary<string, string> { ["FallbackExpandDir1"] = extnDir1 }); 636var projectCollection = GetProjectCollection(new Dictionary<string, string> { ["FallbackExpandDir1"] = extnDir1 }); 706var projectCollection = GetProjectCollection(new Dictionary<string, string> { ["FallbackExpandDir1"] = extnDir1 }); 771var projectCollection = GetProjectCollection(new Dictionary<string, string> { ["FallbackExpandDir1"] = extnDir1 }); 830var projectCollection = GetProjectCollection(new Dictionary<string, string> { ["FallbackExpandDir1"] = extnDir1 }); 866var projectCollection = GetProjectCollection(); 922var projColln = GetProjectCollection(); 973private ProjectCollection GetProjectCollection(IDictionary<string, string> globalProperties = null) 975ProjectCollection projColln;
Evaluation\ItemEvaluation_Tests.cs (2)
28ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 37ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
Evaluation\Preprocessor_Tests.cs (1)
37ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
Evaluation\ProjectCollection_Tests.cs (2)
17var collectionWithDefaultCache = new ProjectCollection(); 25var collectionWithSimpleCache = new ProjectCollection();
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\ProjectSdkImplicitImport_Tests.cs (2)
360var pc = _env.CreateProjectCollection().Collection; 468ProjectCollection projectCollection = _env.CreateProjectCollection().Collection;
Evaluation\ProjectStringCache_Tests.cs (1)
186ProjectCollection collection = new ProjectCollection();
Evaluation\SdkResultEvaluation_Tests.cs (1)
27private ProjectCollection _projectCollection;
Evaluation\SimpleProjectRootElementCache_Tests.cs (2)
21ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 27ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
Evaluation\ToolsetConfigurationNet5_Tests.cs (2)
29var projectCollection = new ProjectCollection(); 56var projectCollection = new ProjectCollection(ToolsetDefinitionLocations.ConfigurationFile);
EvaluationProfiler_Tests.cs (2)
279using (var projectCollection = new ProjectCollection()) 302private Project CreateProject(string contents, string toolsVersion, ProjectCollection projectCollection)
FixPathOnUnix_Tests.cs (1)
44var projColln = new ProjectCollection();
Graph\GetCompatiblePlatformGraph_Tests.cs (1)
439ProjectCollection projectCollection = testEnvironment.CreateProjectCollection().Collection;
Graph\ProjectGraph_Tests.cs (3)
107ProjectCollection.GlobalProjectCollection, 209ProjectCollection.GlobalProjectCollection, 360var collection = _env.CreateProjectCollection().Collection;
Graph\ResultCacheBasedBuilds_Tests.cs (1)
305var collection = _env.CreateProjectCollection().Collection;
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); 507ProjectCollection.GlobalProjectCollection.LoadProject(
Instance\ProjectInstance_Internal_Tests.cs (12)
287XmlReader.Create(new StringReader("<Project></Project>")), ProjectCollection.GlobalProjectCollection.ProjectRootElementCache, false, false)); 298var projectCollection = new ProjectCollection(); 692public delegate ProjectInstance ProjectInstanceFactory(string file, ProjectRootElement xml, ProjectCollection collection); 756var projectCollection = env.CreateProjectCollection().Collection; 847ProjectCollection projectCollection = new ProjectCollection(); 880ProjectCollection projectCollection = testEnvironment.CreateProjectCollection().Collection; 908ProjectCollection projectCollection = testEnvironment.CreateProjectCollection().Collection; 945private static ProjectInstance GetProjectInstance(string content, HostServices hostServices, IDictionary<string, string> globalProperties, ProjectCollection projectCollection, string toolsVersion = null) 957Project project = new Project(reader, globalProperties, toolsVersion ?? ObjectModelHelpers.MSBuildDefaultToolsVersion, projectCollection ?? ProjectCollection.GlobalProjectCollection); 983private static ProjectInstance GetSampleProjectInstance(HostServices hostServices, IDictionary<string, string> globalProperties, ProjectCollection projectCollection, string toolsVersion = null) 1016private static void CreateMockToolsetIfNotExists(string toolsVersion, ProjectCollection projectCollection) 1018ProjectCollection pc = projectCollection;
Utilities_Tests.cs (1)
13using ProjectCollection = Microsoft.Build.Evaluation.ProjectCollection;
Microsoft.Build.Tasks.UnitTests (13)
CallTarget_Tests.cs (2)
21ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 26ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
CreateProperty_Tests.cs (2)
16ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 21ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
Exec_Tests.cs (2)
951var collection = new ProjectCollection( 1008var collection = new ProjectCollection(
MSBuild_Tests.cs (2)
29ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); 34ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
ResolveSDKReference_Tests.cs (5)
3811ProjectCollection pc = new ProjectCollection(); 3954ProjectCollection pc = new ProjectCollection(); 4063ProjectCollection pc = new ProjectCollection(); 4160ProjectCollection pc = new ProjectCollection(); 4329ProjectCollection pc = new ProjectCollection();
Microsoft.Build.UnitTests.Shared (14)
EngineTestEnvironment.cs (2)
216using (ProjectCollection projectCollection = new ProjectCollection()) 273public ProjectCollection Collection { get; }
MockEngine.cs (1)
40private readonly ProjectCollection _projectCollection = new ProjectCollection();
MockLogger.cs (2)
16using ProjectCollection = Microsoft.Build.Evaluation.ProjectCollection; 443typeof(ProjectCollection).GetTypeInfo().Assembly));
ObjectModelHelpers.cs (9)
138public static void AssertItemEvaluationFromGenericItemEvaluator(Func<string, ProjectCollection, IList<ITestItem>> itemEvaluator, string projectContents, string[] inputFiles, string[] expectedInclude, bool makeExpectedIncludeAbsolute = false, Dictionary<string, string>[] expectedMetadataPerItem = null, bool normalizeSlashes = false) 141using (var collection = new ProjectCollection()) 661public static ProjectRootElement CreateInMemoryProjectRootElement(string projectContents, ProjectCollection collection = null, bool preserveFormatting = true) 699public static Project CreateInMemoryProject(ProjectCollection projectCollection, string xml, params ILogger[] loggers) 713ProjectCollection projectCollection, 768using ProjectCollection collection = new(); 796using ProjectCollection collection = new(); 979ProjectCollection projectCollection = new ProjectCollection(); 1738ProjectCollection projectCollection = null,
Microsoft.Build.Utilities.UnitTests (10)
MuxLogger_Tests.cs (6)
57BuildParameters parameters = new BuildParameters(ProjectCollection.GlobalProjectCollection); 94ProjectCollection projectCollection = new ProjectCollection(); 146BuildParameters parameters = new BuildParameters(ProjectCollection.GlobalProjectCollection); 198BuildParameters parameters = new BuildParameters(ProjectCollection.GlobalProjectCollection); 252BuildParameters parameters = new BuildParameters(ProjectCollection.GlobalProjectCollection); 300BuildParameters parameters = new BuildParameters(ProjectCollection.GlobalProjectCollection);
ToolLocationHelper_Tests.cs (4)
692string tv12path = Path.Combine(ProjectCollection.GlobalProjectCollection.GetToolset(ObjectModelHelpers.MSBuildDefaultToolsVersion).ToolsPath, MSBuildExeName); 714var toolsPath32 = ProjectCollection.GlobalProjectCollection.GetToolset(ObjectModelHelpers.MSBuildDefaultToolsVersion).Properties["MSBuildToolsPath32"]; 3584ProjectCollection pc = new ProjectCollection(); 3656ProjectCollection pc = new ProjectCollection();
MSBuild (9)
XMake.cs (9)
825using (ProjectCollection collection = new(globalProperties, loggers, ToolsetDefinitionLocations.Default)) 1300ProjectCollection projectCollection = null; 1699private static bool PrintTargets(string projectFile, string toolsVersion, Dictionary<string, string> globalProperties, TextWriter targetsWriter, ProjectCollection projectCollection) 1748ProjectCollection.DisplayVersion), 4026Assembly engineAssembly = typeof(ProjectCollection).GetTypeInfo().Assembly; 4085Assembly engineAssembly = typeof(ProjectCollection).GetTypeInfo().Assembly; 4531Console.WriteLine(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("MSBuildVersionMessage", ProjectCollection.DisplayVersion, NativeMethods.FrameworkName)); 4611Console.WriteLine(ProjectCollection.Version.ToString()); 4615Console.Write(ProjectCollection.Version.ToString());
TaskUsageLogger (1)
TaskUsageLogger.cs (1)
55private ProjectCollection _privateCollection;