internal BuildResult InternalExecute() { BuildResult = new BuildResult() { SubmissionId = SubmissionId }; try { var engine = new BuildEngine4(this); string toolsVersion = request.ExplicitlySpecifiedToolsVersion ?? request.ProjectInstance.ToolsVersion ?? BuildManager.OngoingBuildParameters.DefaultToolsVersion; var outputs = new Dictionary <string, string> (); engine.BuildProject(() => is_canceled, BuildResult, request.ProjectInstance, request.TargetNames, BuildManager.OngoingBuildParameters.GlobalProperties, outputs, toolsVersion); } catch (Exception ex) { BuildResult.Exception = ex; BuildResult.OverallResult = BuildResultCode.Failure; } is_completed = true; if (callback != null) { callback(this); } wait_handle.Set(); return(BuildResult); }