public override bool Execute() { Log.LogMessage(string.Format("Starting to build '{0}'", ApplicationToBuild)); try { var aionBuilder = new AionBuilder(AionBuildProcess, null, Log); var worker = new BackgroundWorker(); worker.DoWork += WorkerDoWork; worker.WorkerSupportsCancellation = true; worker.RunWorkerAsync(); aionBuilder.Build(ApplicationToBuild, ShouldRestoreCodeFromApp, BuildTimeOutInSeconds); worker.CancelAsync(); Log.LogMessage(string.Format("Finished building '{0}'{1}", ApplicationToBuild, Environment.NewLine)); return aionBuilder.IsBuildSuccesful; } catch (Exception e) { Log.LogError(e.Message + " > " + e.StackTrace); return false; } }
public override bool Execute() { Log.LogMessage(string.Format("Starting to build '{0}'", ApplicationToBuild)); try { var aionBuilder = new AionBuilder(AionBuildProcess, null, Log); var worker = new BackgroundWorker(); worker.DoWork += WorkerDoWork; worker.WorkerSupportsCancellation = true; worker.RunWorkerAsync(); aionBuilder.Build(ApplicationToBuild, ShouldRestoreCodeFromApp, BuildTimeOutInSeconds); worker.CancelAsync(); Log.LogMessage(string.Format("Finished building '{0}'{1}", ApplicationToBuild, Environment.NewLine)); return(aionBuilder.IsBuildSuccesful); } catch (Exception e) { Log.LogError(e.Message + " > " + e.StackTrace); return(false); } }