问题
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