title: Await operator can only be used within an Async method
body: <p>I'm trying to make a simple program to test the new .NET async functionality within Visual Studio 2012. I generally use BackgroundWorkers to run time-consuming code asynchronously, but sometimes it seems like a hassle for a relatively simple (but expensive) operation. The new async modifier looks like it would be great to use, but unfortunately I just can't seem to get a simple test going.</p>
  
  <p>Here's my code, in a C# console application:</p>
  
  <pre class="lang-cs prettyprint-override"><code>static void Main(string[] args)
  {
      string MarsResponse = await QueryRover();
      Console.WriteLine("Waiting for response from Mars...");
      Console.WriteLine(MarsResponse);
      Console.Read();
  }
  
  public static async Task&lt;string&gt; QueryRover()
  {
      await Task.Delay(5000);
      return "Doin' good!";
  }
  </code></pre>
  
  <p>I checked out some examples on MSDN and it looks to me like this code should be working, but instead I'm getting a build error on the line containing "await QueryRover();" Am I going crazy or is something fishy happening?</p>