title: UWP PreLoaded SQLite
body: <p>I am trying to copy a preloaded SQLite db into my UWP app.  On the initial installation it copies the "test.db", but the size is 0 bytes and there are no tables or data.  The original db is 1300 bytes with data and tables. </p>
  
  <p>Another factoid...when I create the app Using Visual Studio 2017 and compile and run/debug the app it works fine, but when I sideload the appx file or download from the Windows Store the db is empty. </p>
  
  <p>Here is the code that I am using:</p>
  
  <pre><code>  Task task = CopyDatabase();
  
  
   private async Task CopyDatabase()
      {
          bool isDatabaseExisting = false;
  
          try
          {
              StorageFile storageFile = await ApplicationData.Current.LocalFolder.GetFileAsync("Express.db");
              isDatabaseExisting = true;
          }
          catch
          {
              isDatabaseExisting = false;
          }
  
          if (!isDatabaseExisting)
          {
              StorageFile databaseFile = await Package.Current.InstalledLocation.GetFileAsync("Express.db");
              await databaseFile.CopyAsync(ApplicationData.Current.LocalFolder, "Express.db", NameCollisionOption.ReplaceExisting);
          }
      }
  </code></pre>
  
  <p>I'm not getting any error messages.  </p>