Reading file from local storage fails on UWP
After creating a path using the PortablePath and passing in LocalStorage, I am only able to access it if I use GetFileFromPathAsync. It fails when I use LocalStorage.GetFileAsync. It wo
string path = PortablePath.Combine(FileSystem.Current.LocalStorage.Path, model.filename);
//Succeeds on UWP, iOS, and Android
IFile file = await FileSystem.Current.GetFileFromPathAsync(path);
//Fails on UWP, succeeds on iOS and Android
IFile file = await FileSystem.Current.LocalStorage.GetFileAsync(path);
I was getting Exception thrown: 'System.NotImplementedException' in PCLStorage.dll
when executing on UWP (but code is in a PCL) IFolder rootFolder = FileSystem.Current.LocalStorage;
Problem was that I had not added the nuget package to the UWP application, although I had added it to the PCL. Needs to be in both places.
@zippo227 can you close the issue if it has been resolved?
@xavier-rigau the issue is not resolved. I did have the PCL in the proper locations. Has an update been pushed to fix this issue that I should test?
Wew, 45 open issues, 7 pending pull requests. This library seems to move to trash :(