title: ApplicationData.current.LocalFolder.CreateFolderAsync fails on surface Pro
body: <p>While on my local box the following code works:</p>
  
  <pre><code> public async Task&lt;GameStatistic&gt; LoadReport()
      {
          var folder = await ApplicationData.Current.LocalFolder.CreateFolderAsync(FolderName, CreationCollisionOption.OpenIfExists);
          var file = await folder.GetFileAsync(FileName);
  
          GameStatistic returnValue;
          using (var inStream = await file.OpenSequentialReadAsync())
          {
              var serializer = new DataContractJsonSerializer(typeof (GameStatistic));
              returnValue = serializer.ReadObject(inStream.AsStreamForRead()) as GameStatistic;
          }
          return returnValue;
      }
  </code></pre>
  
  <p>Code that calls the above method:</p>
  
  <pre><code>  public GameStatistic GetReportData()
      {
          var repo = new GameRepository();
          var gameStatTask = repo.LoadReport(); //(awaitable) Task&lt;GameStatistic&gt;
  
          gameStatTask.Wait();  //this seems to make no difference
          return gameStatTask.Result;
      }
  </code></pre>
  
  <p>But When I move to code to my Surface Pro and run the application (no debugger), the <code>folder.GetFileAsync(FileName)</code> fails because the async call to get the folder hasn't returned yet.</p>
  
  <p>When I debug the application on my Surface Pro (via Remote Machine) and slowly walk the debugger past the first line of code and wait a few seconds, and then step again, everything works. </p>
  
  <p>I don't like the idea of trying to put a thread to sleep for an arbitrary length of time, but I am not sure what else I can do here.</p>
  
  <p>Is there something I am doing wrong or something I should be doing that I am not doing at all?
  Is there a common practice that would really wait until the CreateFolderAsync returns so that when I call folder.GetFileAsync that I could be sure the preceding line was complete?</p>
  
  <p>Thanks for any help you may be able to provide.</p>