private static void Main(string[] args) { try { using (AsyncDiagnosticStack.Enter("Hi")) { Test.MainAsync().Wait(); } } catch (AggregateException ex) { foreach (var exception in ((AggregateException)ex.InnerException).InnerExceptions) { Console.WriteLine(exception.ToAsyncDiagnosticString()); } } Console.ReadKey(); }