title: Task does not wait for ContinueWith to finish
body: <p>I have console application and code as below,</p>
  
  <p>My problem is before ContinueWith task finish, the console application ends, it does not waits the continueWith to finish, please advise.</p>
  
  <p>Please let me know what I am missing or incorrect.</p>
  
  <pre><code>var task1 = Task&lt;bool&gt;.Factory.StartNew(() =&gt; DoProcess());
  
  task1 .ContinueWith(
       t1 =&gt; updateSuccess(),
         TaskContinuationOptions.NotOnFaulted | TaskContinuationOptions.ExecuteSynchronously);
  
  task1 .ContinueWith(
       t =&gt; updateFault(),
       TaskContinuationOptions.OnlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously);
  
  task1.Wait();
  </code></pre>