Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ private ITask InstantiateTask(int scheduledNodeId, IDictionary<string, string> t
return null;
}

task = CreateTaskHostTaskForOutOfProcFactory(taskIdentityParameters, taskFactoryEngineContext, outOfProcTaskFactory);
task = CreateTaskHostTaskForOutOfProcFactory(taskIdentityParameters, taskFactoryEngineContext, outOfProcTaskFactory, scheduledNodeId);
isTaskHost = true;
}
else
Expand Down Expand Up @@ -1740,8 +1740,13 @@ private void DisplayCancelWaitMessage()
/// <param name="taskIdentityParameters">Task identity parameters.</param>
/// <param name="taskFactoryEngineContext">The engine context to use for the task.</param>
/// <param name="outOfProcTaskFactory">The out-of-process task factory instance.</param>
/// <param name="scheduledNodeId">Node for which the task host should be called</param>
/// <returns>A TaskHostTask that will execute the inner task out of process, or <code>null</code> if task creation fails.</returns>
private ITask CreateTaskHostTaskForOutOfProcFactory(IDictionary<string, string> taskIdentityParameters, TaskFactoryEngineContext taskFactoryEngineContext, IOutOfProcTaskFactory outOfProcTaskFactory)
private ITask CreateTaskHostTaskForOutOfProcFactory(
IDictionary<string, string> taskIdentityParameters,
TaskFactoryEngineContext taskFactoryEngineContext,
IOutOfProcTaskFactory outOfProcTaskFactory,
int scheduledNodeId)
{
ITask innerTask;

Expand Down Expand Up @@ -1791,19 +1796,17 @@ private ITask CreateTaskHostTaskForOutOfProcFactory(IDictionary<string, string>
// Clean up the original task since we're going to wrap it
_taskFactoryWrapper.TaskFactory.CleanupTask(innerTask);

#pragma warning disable SA1111, SA1009 // Closing parenthesis should be on line of last parameter
return new TaskHostTask(
_taskLocation,
_taskLoggingContext,
_buildComponentHost,
taskHostParameters,
taskLoadedType,
true
true,
#if FEATURE_APPDOMAIN
, AppDomainSetup
AppDomainSetup,
#endif
);
#pragma warning restore SA1111, SA1009 // Closing parenthesis should be on line of last parameter
scheduledNodeId);
}
}
}
1 change: 0 additions & 1 deletion src/Build/Instance/TaskFactories/AssemblyTaskFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ internal ITask CreateTaskInstance(
AddNetHostParams(ref mergedParameters, getProperty);
}

#pragma warning disable SA1111, SA1009 // Closing parenthesis should be on line of last parameter
TaskHostTask task = new TaskHostTask(
taskLocation,
taskLoggingContext,
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Instance/TaskFactories/TaskHostTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public TaskHostTask(
#if FEATURE_APPDOMAIN
AppDomainSetup appDomainSetup,
#endif
int scheduledNodeId = -1)
int scheduledNodeId)
{
ErrorUtilities.VerifyThrowInternalNull(taskType);

Expand Down