void OnMSBuildProcessExited(int currentSessionId, MSBuildProcessProgressMonitor monitor) { MSBuildTarget buildTarget = null; using (monitor) { lock (buildTargets) { if (buildTargets.TryGetValue(currentSessionId, out buildTarget)) { buildTargets.Remove(currentSessionId); } else { return; } } if (monitor.Process.Task.IsFaulted) { buildTarget.OnException(monitor.Process.Task.Exception); } else if (monitor.Process.Task.IsCanceled) { buildTarget.OnResult(MSBuildTargetStatus.Failed); } else if (monitor.Process.ProcessAsyncOperation.ExitCode == 0) { buildTarget.OnResult(MSBuildTargetStatus.Finished); } else { buildTarget.OnResult(MSBuildTargetStatus.Failed); } } ProjectSystemService.OnTargetFinished(buildTarget); }
public void OnResult(TargetEvaluationResult result) { buildTarget.OnResult(result); ProjectSystemService.OnTargetFinished(buildTarget); }