30 instantiations of BuildManager
Microsoft.Build (1)
BackEnd\BuildManager\BuildManager.cs (1)
355s_singletonInstance = new BuildManager("Default");
Microsoft.Build.BuildCheck.UnitTests (1)
TaskInvocationAnalysisDataTests.cs (1)
87using (var buildManager = new BuildManager())
Microsoft.Build.Engine.UnitTests (24)
BackEnd\BuildManager_Logging_Tests.cs (1)
75_buildManager = new BuildManager();
BackEnd\BuildManager_Tests.cs (9)
84_buildManager = new BuildManager(); 374using var shutdownManager = new BuildManager("IdleNodeShutdown"); 1156using (var bm = new BuildManager()) 1165var bm = new BuildManager(); 2168using (var newBuildManager = new BuildManager()) 2345using (var outerBuildManager = new BuildManager()) 2353using (var innerBuildManager = new BuildManager()) 3690using (var manager = new BuildManager()) 4075using var manager = new BuildManager();
BackEnd\Scheduler_Tests.cs (3)
85_buildManager = new BuildManager(); 388_buildManager = new BuildManager(); 580_buildManager = new BuildManager();
BackEnd\SdkResultOutOfProc_Tests.cs (1)
64_buildManager = new BuildManager();
BackEnd\TargetEntry_Tests.cs (1)
880manager = new BuildManager();
BackEnd\TaskBuilder_Tests.cs (1)
146BuildManager manager = new BuildManager();
BackEnd\TaskRegistry_Tests.cs (1)
662using (var buildManager = new BuildManager())
BinaryLogger_Tests.cs (3)
443using var buildManager = new BuildManager(); 487using var buildManager = new BuildManager(); 573using var buildManager = new BuildManager();
Construction\SolutionProjectGenerator_Tests.cs (2)
2125buildManager = new BuildManager(); 2213buildManager = new BuildManager();
EvaluationProfiler_Tests.cs (1)
61_buildManager = new BuildManager();
Graph\ResultCacheBasedBuilds_Tests.cs (1)
102using (var buildManager = new BuildManager())
Microsoft.Build.Tasks.UnitTests (2)
Exec_Tests.cs (2)
943using (var buildManager = new BuildManager()) 999using (var buildManager = new BuildManager())
Microsoft.Build.UnitTests.Shared (2)
ObjectModelHelpers.cs (2)
1415using (var buildManager = new BuildManager()) 2087_buildManager = new BuildManager();
162 references to BuildManager
Microsoft.Build (32)
BackEnd\BuildManager\BuildManager.cs (12)
69private static BuildManager? s_singletonInstance; 276/// Access it with <see cref="BuildManager.DefaultBuildManager"/> 286/// Access it with <see cref="BuildManager.DefaultBuildManager"/> 313/// Finalizes an instance of the <see cref="BuildManager"/> class. 332/// <see cref="BuildManager.PendBuildRequest(Microsoft.Build.Execution.BuildRequestData)"/>, <see cref="BuildManager.BuildRequest(Microsoft.Build.Execution.BuildRequestData)"/>, <see cref="BuildManager.PendBuildRequest(GraphBuildRequestData)"/>, <see cref="BuildManager.BuildRequest(GraphBuildRequestData)"/>, and <see cref="BuildManager.EndBuild()"/> may be called in this state. 337/// This is the state the BuildManager is in after <see cref="BuildManager.EndBuild()"/> has been called but before all existing submissions have completed. 345public static BuildManager DefaultBuildManager 392/// <see cref="BuildManager.BeginBuild(BuildParameters,IEnumerable{DeferredBuildMessage})"/>
BackEnd\BuildManager\BuildRequestData.cs (1)
182internal override BuildSubmissionBase<BuildRequestData, BuildResult> CreateSubmission(BuildManager buildManager,
BackEnd\BuildManager\BuildRequestDataBase.cs (1)
65BuildManager buildManager, int submissionId, TRequestData requestData, bool legacyThreadingSemantics);
BackEnd\BuildManager\BuildSubmission.cs (3)
35protected internal BuildSubmissionBase(BuildManager buildManager, int submissionId, TRequestData requestData) 158internal BuildSubmission(BuildManager buildManager, int submissionId, BuildRequestData requestData, bool legacyThreadingSemantics) 254public new BuildManager BuildManager => base.BuildManager;
BackEnd\BuildManager\BuildSubmissionBase.cs (2)
41protected internal BuildSubmissionBase(BuildManager buildManager, int submissionId) 55public BuildManager BuildManager { get; }
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
196if (Execution.BuildManager.WaitForDebugger)
BackEnd\Components\Logging\LoggingService.cs (1)
1857Execution.BuildManager.NullLogger => null,
BackEnd\Components\ProjectCache\ProjectCacheService.cs (2)
36private readonly BuildManager _buildManager; 77BuildManager buildManager,
BackEnd\Node\OutOfProcServerNode.cs (1)
327BuildManager.DefaultBuildManager.CancelAllSubmissions();
BuildCheck\Infrastructure\BuildCheckReplayModeConnector.cs (2)
25/// <param name="buildManager"><see cref="BuildManager"/> to get the registered <see cref="IBuildCheckManagerProvider"/> component from.</param> 29BuildManager buildManager,
Evaluation\Evaluator.cs (1)
851BuildManager.ProjectCacheDescriptors.TryAdd(projectCacheItem, projectCacheItem);
Graph\GraphBuildRequestData.cs (1)
189internal override BuildSubmissionBase<GraphBuildRequestData, GraphBuildResult> CreateSubmission(BuildManager buildManager, int submissionId, GraphBuildRequestData requestData,
Graph\GraphBuildSubmission.cs (2)
30internal GraphBuildSubmission(BuildManager buildManager, int submissionId, GraphBuildRequestData requestData) : 87public new BuildManager BuildManager => base.BuildManager;
Instance\ProjectInstance.cs (2)
2692BuildManager buildManager = BuildManager.DefaultBuildManager;
Microsoft.Build.BuildCheck.UnitTests (1)
TaskInvocationAnalysisDataTests.cs (1)
87using (var buildManager = new BuildManager())
Microsoft.Build.CommandLine.UnitTests (1)
MSBuildServer_Tests.cs (1)
255BuildManager.DefaultBuildManager.ShutdownAllNodes();
Microsoft.Build.Engine.OM.UnitTests (4)
Definition\ProjectItem_Tests.cs (2)
3757var buildManager = BuildManager.DefaultBuildManager;
Instance\ProjectInstance_Tests.cs (2)
402BuildManager.DefaultBuildManager.Build(new BuildParameters(), buildRequestData1); 408BuildManager.DefaultBuildManager.Build(new BuildParameters(), buildRequestData2);
Microsoft.Build.Engine.UnitTests (66)
BackEnd\BuildManager_Logging_Tests.cs (2)
55private readonly BuildManager _buildManager; 72BuildManager.DefaultBuildManager.Dispose();
BackEnd\BuildManager_Tests.cs (32)
48private readonly BuildManager _buildManager; 75BuildManager.DefaultBuildManager.Dispose(); 374using var shutdownManager = new BuildManager("IdleNodeShutdown"); 985new BuildManager.DeferredBuildMessage(highMessage, MessageImportance.High), 986new BuildManager.DeferredBuildMessage(normalMessage, MessageImportance.Normal), 987new BuildManager.DeferredBuildMessage(lowMessage, MessageImportance.Low) 1156using (var bm = new BuildManager()) 1165var bm = new BuildManager(); 2168using (var newBuildManager = new BuildManager()) 2345using (var outerBuildManager = new BuildManager()) 2353using (var innerBuildManager = new BuildManager()) 3135BuildManager.DefaultBuildManager.BeginBuild(buildParameters); 3140ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3143BuildSubmission submission = BuildManager.DefaultBuildManager.PendBuildRequest(requestData); 3151ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3153BuildSubmission submission = BuildManager.DefaultBuildManager.PendBuildRequest(requestData); 3161BuildManager.DefaultBuildManager.EndBuild(); 3213BuildManager.DefaultBuildManager.BeginBuild(buildParameters); 3219ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3222BuildSubmission submission = BuildManager.DefaultBuildManager.PendBuildRequest(requestData); 3231ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3233BuildSubmission submission = BuildManager.DefaultBuildManager.PendBuildRequest(requestData); 3242BuildManager.DefaultBuildManager.EndBuild(); 3300BuildManager.DefaultBuildManager.BeginBuild(buildParameters); 3306ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3309BuildSubmission submission = BuildManager.DefaultBuildManager.PendBuildRequest(requestData); 3318ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3320BuildSubmission submission = BuildManager.DefaultBuildManager.PendBuildRequest(requestData); 3329BuildManager.DefaultBuildManager.EndBuild(); 3490private static string BuildAndCheckCache(BuildManager localBuildManager, IEnumerable<string> exceptCacheDirectories) 3690using (var manager = new BuildManager()) 4075using var manager = new BuildManager();
BackEnd\Scheduler_Tests.cs (4)
54private BuildManager _buildManager; 68NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 375NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 569NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc;
BackEnd\SdkResultOutOfProc_Tests.cs (2)
36private readonly BuildManager _buildManager; 55BuildManager.DefaultBuildManager.Dispose();
BackEnd\TargetEntry_Tests.cs (2)
835NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 849BuildManager manager = null;
BackEnd\TaskBuilder_Tests.cs (1)
146BuildManager manager = new BuildManager();
BackEnd\TaskRegistry_Tests.cs (1)
662using (var buildManager = new BuildManager())
BinaryLogger_Tests.cs (3)
443using var buildManager = new BuildManager(); 487using var buildManager = new BuildManager(); 573using var buildManager = new BuildManager();
ConsoleLogger_Tests.cs (3)
219BuildManager.DefaultBuildManager.Build( 260BuildManager.DefaultBuildManager.Build( 312BuildManager.DefaultBuildManager.Build(
Construction\SolutionProjectGenerator_Tests.cs (4)
2109BuildManager buildManager = null; 2115NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 2197BuildManager buildManager = null; 2203NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc;
EvaluationProfiler_Tests.cs (2)
28private readonly BuildManager _buildManager; 59BuildManager.DefaultBuildManager.Dispose();
Graph\ResultCacheBasedBuilds_Tests.cs (1)
102using (var buildManager = new BuildManager())
ProjectCache\ProjectCacheTests.cs (9)
36BuildManager.ProjectCacheDescriptors.ShouldBeEmpty(); 37_env.WithInvariant(new CustomConditionInvariant(() => BuildManager.ProjectCacheDescriptors.IsEmpty)); 569BuildManager.ProjectCacheDescriptors.ShouldBeEmpty(); 573BuildManager.ProjectCacheDescriptors.ShouldHaveSingleItem(); 622BuildManager.ProjectCacheDescriptors.Clear(); 720BuildManager.ProjectCacheDescriptors.Clear(); 1450BuildManager.ProjectCacheDescriptors.ShouldBeEmpty(); 1463BuildManager.ProjectCacheDescriptors.ShouldHaveSingleItem(); 1506BuildManager.ProjectCacheDescriptors.Clear();
Microsoft.Build.Tasks.UnitTests (3)
CreateItem_Tests.cs (1)
216BuildResult result = BuildManager.DefaultBuildManager.Build(parameters, data);
Exec_Tests.cs (2)
943using (var buildManager = new BuildManager()) 999using (var buildManager = new BuildManager())
Microsoft.Build.UnitTests.Shared (10)
EngineTestEnvironment.cs (4)
47BuildManager.DefaultBuildManager.BeginBuild( 56BuildManager.DefaultBuildManager.EndBuild(); 57BuildManager.DefaultBuildManager.Dispose(); 65SingletonField = typeof(BuildManager).GetField("s_singletonInstance", BindingFlags.Static | BindingFlags.NonPublic);
ObjectModelHelpers.cs (6)
1022BuildResult result = BuildManager.DefaultBuildManager.Build(parameters, data); 1415using (var buildManager = new BuildManager()) 1484BuildManager buildManager = BuildManager.DefaultBuildManager; 2062private readonly BuildManager _buildManager; 2071IEnumerable<BuildManager.DeferredBuildMessage> deferredMessages = null)
Microsoft.Build.Utilities.UnitTests (14)
MuxLogger_Tests.cs (14)
31BuildManager buildManager = BuildManager.DefaultBuildManager; 56BuildManager buildManager = BuildManager.DefaultBuildManager; 90BuildManager buildManager = BuildManager.DefaultBuildManager; 151BuildManager buildManager = BuildManager.DefaultBuildManager; 205BuildManager buildManager = BuildManager.DefaultBuildManager; 260BuildManager buildManager = BuildManager.DefaultBuildManager; 309BuildManager buildManager = BuildManager.DefaultBuildManager;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
Build\ProjectBuildManager.cs (4)
202MSB.Execution.BuildManager.DefaultBuildManager.BeginBuild(buildParameters); 214MSB.Execution.BuildManager.DefaultBuildManager.EndBuild(); 285return await BuildAsync(MSB.Execution.BuildManager.DefaultBuildManager, requestData, cancellationToken).ConfigureAwait(false); 289private static Task<MSB.Execution.BuildResult> BuildAsync(MSB.Execution.BuildManager buildManager, MSB.Execution.BuildRequestData requestData, CancellationToken cancellationToken)
MSBuild (27)
XMake.cs (27)
1193BuildManager.DefaultBuildManager.CancelAllSubmissions(); 1249private static readonly List<BuildManager.DeferredBuildMessage> s_globalMessagesToLogInBuildLoggers = new(); 1523List<BuildManager.DeferredBuildMessage> messagesToLogInBuildLoggers = new(); 1525BuildManager buildManager = BuildManager.DefaultBuildManager; 1544new BuildManager.DeferredBuildMessage( 1703BuildManager.DefaultBuildManager.Dispose(); 1732private static List<BuildManager.DeferredBuildMessage> GetMessagesToLogInBuildLoggers(string commandLineString) 1734List<BuildManager.DeferredBuildMessage> messages = new(s_globalMessagesToLogInBuildLoggers) 1736new BuildManager.DeferredBuildMessage( 1741new BuildManager.DeferredBuildMessage( 1746new BuildManager.DeferredBuildMessage( 1751new BuildManager.DeferredBuildMessage( 1756new BuildManager.DeferredBuildMessage( 1767new BuildManager.DeferredBuildMessage( 1779new BuildManager.DeferredBuildMessage( 1790new BuildManager.DeferredBuildMessage( 1800private static BuildResult ExecuteBuild(BuildManager buildManager, BuildRequestData request) 1819private static GraphBuildResult ExecuteGraphBuild(BuildManager buildManager, GraphBuildRequestData request) 1838private static BuildResult ExecuteRestore(string projectFile, string toolsVersion, BuildManager buildManager, Dictionary<string, string> globalProperties, bool saveProjectResult = false) 2526BuildManager.WaitForDebugger = true; 2842new BuildManager.DeferredBuildMessage(ResourceUtilities.GetResourceString("TerminalLoggerNotUsedRedirected"), MessageImportance.Low)); 2850new BuildManager.DeferredBuildMessage(ResourceUtilities.GetResourceString("TerminalLoggerNotUsedNotSupported"), MessageImportance.Low)); 2857new BuildManager.DeferredBuildMessage(ResourceUtilities.GetResourceString("TerminalLoggerNotUsedDisabled"), MessageImportance.Low)); 2932new BuildManager.DeferredBuildMessage($"The environment variable MSBUILDTERMINALLOGGER was set to {terminalLoggerArg}.", MessageImportance.Low)); 2941new BuildManager.DeferredBuildMessage($"The environment variable MSBUILDLIVELOGGER was set to {liveLoggerArg}.", MessageImportance.Low)); 4456BuildCheckReplayModeConnector.GetMergedEventSource(BuildManager.DefaultBuildManager, replayEventSource) :