title: Unobserved task exceptions in .NET4
body: <p>According to some articles and blogs a code like the following one should lead to an exception in .NET 4</p>
  
  <pre><code>static void Main(string[] args)
      {
          Task.Factory.StartNew(() =&gt; { throw new Exception(); });
          Thread.Sleep(1000);
          GC.Collect();
          GC.WaitForPendingFinalizers();
          Console.WriteLine("Completed"); 
      }
  </code></pre>
  
  <p>Expected exception:</p>
  
  <blockquote>
    <p>Unhandled Exception: System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.InvalidOperationException: Operation is not valid due to the current state of the object.</p>
  </blockquote>
  
  <p>But it doesn`t.
  .NET 4 applications on my PC behave like .NET 4.5:</p>
  
  <ul>
  <li>they don`t throw that aggregate exception by default</li>
  <li>they detect the following setting in the configuration file:</li>
  </ul>
  
  <blockquote>
    <p>&lt; ThrowUnobservedTaskExceptions enabled="true"/></p>
  </blockquote>
  
  <p>Looks like .NET 4 has been patched to get the same behavior that .NET 4.5 has. It it true or I have some troubles with my configuration?
  Or any .NET4 app (not targeting 4.5) will behave that way if 4.5 is installed?
  Thanks in advance.</p>