0

I am trying to get one line of code working in a Windows 10 UWP.

private static async Task MakeFile()
{
  var file = await 
  Windows.Storage.ApplicationData.Current.TemporaryFolder.CreateFileAsync("bob", CreationCollisionOption.GenerateUniqueName);
}

For some reason When I try to run this the whole app freezes and never comes back

  • Possible duplicate of https://stackoverflow.com/questions/47524306/uwp-storagefolder-getfilesasync-not-returning#comment82004775_47524306 – Pratyay Jan 04 '18 at 05:33
  • It does not seem to be the same issue as the one you posted. My SDK versions match the OS. – Gary Hengeveld Jan 04 '18 at 12:19
  • Can you specify the version ? is it by any chance 16299 ? – Pratyay Jan 04 '18 at 12:27
  • Yes it is 16299 – Gary Hengeveld Jan 05 '18 at 01:54
  • just update your OS or SDK to the next version and this issue will go away.. there was a known bug in 16299 which got fixed in the next builds.. – Pratyay Jan 05 '18 at 02:42
  • my OS and SDK both show they are up to date.so how do I update them? – Gary Hengeveld Jan 05 '18 at 02:56
  • @GaryHengeveld Pratyay meant that you need to join in the [Windows Insider](https://insider.windows.com/en-us/getting-started/) to get the insider preview version. – Bite Jan 05 '18 at 05:59
  • Yes, as @Bite mentioned you can either get the insider build or you can wait for the next stable version. – Pratyay Jan 05 '18 at 06:18
  • But that is actually weird. This freeze bug appeared in older insider preview builds, but 16299 is the stable FCU version and I have no such issues running 16299 and 16299 SDK together, and the code sample runs just fine. It definitely shouldn't be necessary to install the Insider preview. – Martin Zikmund Jan 05 '18 at 07:46
  • Have you tried to run the app without debugging? Does that change the behavior? – Martin Zikmund Jan 05 '18 at 07:46
  • @GaryHengeveld do you try run it on UI Thread ? – Parsa Karami Jan 05 '18 at 08:40
  • I didn't want to update beyond the stable version. I tried without debugging and on the main thread with no luck. So I created a new project and tried it there and it worked fine. So I just redid the app and copied my code over and now it works. Something must have gotten corrupt in that project. – Gary Hengeveld Jan 09 '18 at 17:49

1 Answers1

0

I didn't want to update beyond the stable version. I tried without debugging and on the main thread with no luck. So I created a new project and tried it there and it worked fine. So I just redid the app and copied my code over and now it works. Something must have gotten corrupt in that project