我已在Assets Named Images下的项目文件夹中添加了一个文件夹。我试图访问该文件,但我无法找到该文件夹。我一直在使用我发现的一些代码:
StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
var SharedFolder = await local.GetFolderAsync("Shared");
var ImagesFolder = await SharedFolder.GetFolderAsync("Images");
我总是得到System.IO.FileNotFoundException: The system cant find the file specified
我也试过单独使用这一行
StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
var ImagesFolder = await local.GetFolderAsync("Images");
我仍然收到此错误。有什么我想念的吗?!
答案 0 :(得分:0)
尝试
Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync("Assets/Images");