title: Universal Windows Platform ZipFile.CreateFromDirectory creates empty ZIP file
body: <p>I have a problem with zipping existing directories.
  When I try to compress an existing directory, I always get an empty zip file.
  My code is based on this example from <a href="https://msdn.microsoft.com/en-us/library/hh485707%28v=vs.110%29.aspx" rel="nofollow">MSDN</a>.
  There are no exceptions when debugging the application.</p>
  
  <p>My code:</p>
  
  
  
  <pre><code>private async void PickFolderToCompressButton_Click(object sender, RoutedEventArgs e)
  {
      // Clear previous returned folder name, if it exists, between iterations of this scenario
      OutputTextBlock.Text = "";
  
      FolderPicker folderPicker = new FolderPicker();
      folderPicker.SuggestedStartLocation = PickerLocationId.Desktop;
      folderPicker.FileTypeFilter.Add(".dll");
      folderPicker.FileTypeFilter.Add(".json");
      folderPicker.FileTypeFilter.Add(".xml");
      folderPicker.FileTypeFilter.Add(".pdb");
      StorageFolder folder = await folderPicker.PickSingleFolderAsync();
      if (folder != null)
      {
          // Application now has read/write access to all contents in the picked folder (including other sub-folder contents)
          StorageApplicationPermissions.FutureAccessList.AddOrReplace("PickedFolderToken", folder);
          OutputTextBlock.Text = $"Picked folder: {folder.Name}";
  
          var files  = await folder.GetFilesAsync();
          foreach (var file in files)
          {
              OutputTextBlock.Text += $"\n {file.Name}";
          }
  
          await Task.Run(() =&gt;
          {
              try
              {
                  ZipFile.CreateFromDirectory(folder.Path, $"{folder.Path}\\{Guid.NewGuid()}.zip",
                      CompressionLevel.NoCompression, true);
                  Debug.WriteLine("folder zipped");
              }
              catch (Exception w)
              {
                  Debug.WriteLine(w);
              }
          });
      }
      else
      {
          OutputTextBlock.Text = "Operation cancelled.";
      }
  }
  </code></pre>
  
  <p>A Zip file is created, but it is always empty. There are many files in the source folder.</p>