title: .NET Core Global exception handler in console application
body: <p>I'm porting an console application to <code>.NET Core</code>, and I'm trying to replace this line:</p>
  
  <pre><code>AppDomain.CurrentDomain.UnhandledException += UnhandledException;
  </code></pre>
  
  <p>After reading <a href="https://deepumi.wordpress.com/2017/03/28/net-core-porting-challenges/" rel="noreferrer">this</a>, it seems there is no built-in way to do this.</p>
  
  <p>So my question: is the only way to replace this line surrounding my entire code with a <code>try/catch</code>?</p>
  
  <p>By reading <a href="https://github.com/dotnet/coreclr/issues/2999" rel="noreferrer">this</a>, it seems like there is another way, namely by keep on using <code>System.AppDomain</code>, but I can't seem to find this class/method. My only guess was <a href="https://github.com/SamuelEnglard/System.AppDomain" rel="noreferrer">this library</a>, but it clearly states that it should not be used if possible, so I would like not to.</p>