public static int Main(params string[] args) { try { var p = new Program(); p.Execute(args); return(p.ExitCode ?? 0); } catch (TargetInvocationException e) { Log.Trace(e); Log.Skip(); Log.WriteErrorLine("ERROR: " + e.InnerException.Message.Trailing('.') + " (pass --trace for stack trace)"); return(1); } catch (Exception e) { Log.Trace(e); Log.Skip(); Log.WriteErrorLine("ERROR: " + e.Message.Trailing('.') + " (pass --trace for stack trace)"); return(1); } finally { Shell.CleanUp(); Log.Dispose(); } }