UWP StorageFolder GetFilesAsync() not returning

白昼怎懂夜的黑 提交于 2019-12-11 14:17:21

问题


I have updated my visual studio 2017 to the creators update SDK 16299. But ever since I cannot use the StorageFolder to get files. The execution doesn't return and no exception is thrown.

 try
 {
     var instalationFolder = Package.Current.InstalledLocation;
     var assetFolder = await instalationFolder.GetFolderAsync("Assets");
     var files = await assetFolder.GetFilesAsync();
     var count = files.Count;
 }
 catch (Exception ex){}

Please advice, the execution disappears at assetFolder.GetFilesAsync()


回答1:


Thanks guys, I updated my SDK to match the version of my Insider Preview and now everything is working great. Turns out the OS build and SDK version were out of sync, I downloaded the SDK for 17040 and now I can use the StorageFolder API's



来源:https://stackoverflow.com/questions/47524306/uwp-storagefolder-getfilesasync-not-returning

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!