1

I am new in .Net development. In a UWP app i need to check for package update in Store. I have followed this tutorial. For below code i am getting Exception.

 StoreContext context = StoreContext.GetDefault();
 // Get the updates that are available.
 IReadOnlyList<StorePackageUpdate> updates =
 await context.GetAppAndOptionalStorePackageUpdatesAsync();

Exception thrown: 'System.IO.FileNotFoundException' in System.Private.CoreLib.dll An exception of type 'System.IO.FileNotFoundException' occurred in System.Private.CoreLib.dll but was not handled in user code The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

I can't find any hint why i am getting this exception. Please help my about this exception and how can i resolve this.

Abu Yousuf
  • 5,729
  • 3
  • 31
  • 50
  • Is your app already on the Microsoft Store? This method requires you to upload at least one package of the app in the store – Roy Li - MSFT Jun 15 '21 at 02:21
  • I think its on beta testing . any suggestion @RoyLi-MSFT – Abu Yousuf Jun 15 '21 at 05:45
  • So it is already in the Store, right? Have you tried other APIs like in-app-purchase to see if other APIs work correctly? – Roy Li - MSFT Jun 15 '21 at 08:11
  • I didn't tried other API yet – Abu Yousuf Jun 15 '21 at 12:00
  • @RoyLi-MSFT i have tried `context.GetStoreProductForCurrentAppAsync()` for in app purchase and its returns without any exception – Abu Yousuf Jun 15 '21 at 12:38
  • 1
    I found a similar issue on [Github](https://github.com/microsoft/Windows-Dev-Performance/issues/22). It sounds like you might need to submit App Assure request here: https://aka.ms/appassurerequest So the store team could check if they could help you fix this. – Roy Li - MSFT Jun 16 '21 at 09:17

0 Answers0