title: Error while using Windows.Storage namespace
body: <p>I am trying to save the string into a text file in my temp folder but i have this error: </p>
  
  <pre><code>Error2'await' requires that the type 'Windows.Foundation.IAsyncAction' have a 
  suitable GetAwaiter method. Are you missing a using directive for 'System'
  </code></pre>
  
  <p>Thanks</p>
  
  <p>P.S. this is C# console app.</p>
  
  <p>My Code:</p>
  
  <pre><code>using System;
  using System.IO;
  using System.Linq;
  using Windows.Storage;
  
  public static class Storage
  {
  
      public static async void SaveData()
      {
          string myString = "This is the data I want to save";
          ApplicationDataContainer localSettings = ApplicationData.Current.LocalSettings;
  
          // Add:  using Windows.Storage;
          Windows.Storage.StorageFolder localFolder = Windows.Storage.ApplicationData.Current.TemporaryFolder;
  
          // Optionally overwrite any existing file with CreationCollisionOption
          StorageFile file = await localFolder.CreateFileAsync("mySaveFile.txt", CreationCollisionOption.ReplaceExisting);
  
          try
          {
              if (file != null)
              {
                  await FileIO.WriteTextAsync(file, myString);
              }
          }
          catch (FileNotFoundException)
          {
              // Error saving data
          }
      }
  
  }
  </code></pre>