title: uwp mostrecentlyusedlist addition causes COM type exception
body: <p><strong>StackTrace</strong></p>
  
  <p>"   at Windows.Storage.AccessCache.StorageItemMostRecentlyUsedList.Add(IStorageItem file, String metadata, RecentStorageItemVisibility visibility)\r\n   at FluentVideoPlayer.Helpers.FileHelper.&lt;>c__DisplayClass7_0.b__0()\r\n   at Microsoft.Toolkit.Uwp.Helpers.DispatcherHelper.&lt;>c__DisplayClass10_0`1.b__0()"</p>
  
  <blockquote>
    <p>I am trying to add a StorageFile to <strong>MostRecentlyUsedList</strong> and as a result I am getting this exception.</p>
  </blockquote>
  
  <p><strong>Exception</strong></p>
  
  <blockquote>
    <p>HRESULT E_FAIL has been returned from a call to a COM component</p>
  </blockquote>
  
  <p><strong>Code</strong></p>
  
  <pre><code>internal async static Task AddToHistory(StorageFile fileToBeAdded) =&gt; await DispatcherHelper.ExecuteOnUIThreadAsync(() =&gt; StorageApplicationPermissions.MostRecentlyUsedList.Add(fileToBeAdded, "", RecentStorageItemVisibility.AppAndSystem));
  </code></pre>
  
  <blockquote>
    <p>I have this static method to use within a static class so I can call it from any page in the app. I can verify that StorageFile object is not null and perfect I also tried to solve it by using <strong>DispatcherHelper</strong> as you can see in the code, but with or without it, exception occurs in both cases. </p>
  </blockquote>
  
  <p><strong>Update</strong></p>
  
  <p>I have tried to add to <strong>FutureAccessList</strong> as well instead of <strong>MostRecentlyUsedList</strong> and I am getting same error in both cases</p>
  
  <p><strong>Update 2</strong></p>
  
  <p>accessing the list normally doesn't cause any error, like I can access it with following code</p>
  
  <pre><code>var mlist = StorageApplicationPermissions.MostRecentlyUsedList;
  var entries = mlist.Entries;
  </code></pre>
  
  <p>error only occurs when I try to add a storagefile to it.</p>