user8977483
user8977483

Reputation: 147

ApplicationData.Current.LocalFolder.CreateFileAsync freezes

This routine freezes in UWP 5.2.2 ver.

How can I solve it?

StorageFile file = null;
try
{
    file = await ApplicationData.Current.LocalFolder.CreateFileAsync("save.xml", CreationCollisionOption.ReplaceExisting);
}
catch (Exception e)
{

}

Upvotes: 0

Views: 204

Answers (1)

Martin Zikmund
Martin Zikmund

Reputation: 39082

I suspect you might be using a insider preview version of Windows 10 or insider preview SDK for Windows 10. Several builds had this behavior that some API calls froze, including StorageFile and MessageDialog APIs.

You can confirm this is the case if the app works normally when launched without the debugger attached.

To fix this, I recommend updating your PC to a stable version of Windows as well as updating Visual Studio to the latest stable release.

Upvotes: 1

Related Questions