title: Windows form breaks when calling Task.Result
body: <p>I have code similar to following inside my Windows form:</p>
  
  <pre><code>private async Task&lt;string&gt; GetGreetingAsync()
  {
      return await Task.Run(() =&gt; "Hello");
  }
  
  private void button1_Click(object sender, EventArgs e)
  {
      var x = GetGreetingAsync().Result;
  }
  </code></pre>
  
  <p>Clicking the button causes the entire Windows form to freeze and become unresponsive. No exception is thrown.</p>
  
  <p>Even when I don't use the task <code>.Result</code> directly in the event handler and the whole <code>async</code> marked code is in some class library function, which provides interface without <code>async</code>, the problem still occurs. Unit tests for such class library pass without any problems, but when I call its function from event handler on Windows form, it breaks and does not respond.</p>
  
  <p><strong>Why does this happen? How can I fix it?</strong></p>