Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

DiskImageCache: Could not resolve the absolute path of the old directory.

$
0
0

Hi everyone, i need to load an image from the resources folder using filestream, i have marked the image as a bundle resource and this is my code to access the file:

FileStream logostream = new FileStream (
NSBundle.MainBundle.PathForResource ("logo", "png"), FileMode.Open, FileAccess.Read
);

getting this error
DiskImageCache: Could not resolve the absolute path of the old directory.

Console.WriteLine(
NSBundle.MainBundle.PathForResource ("logo", "png")
)
Shows this
/Users/user/Library/Developer/CoreSimulator/Devices/Device number/data/Containers/Bundle/Application/App number/MyApp.app/logo.png

Any help pls?
Tested on emulator & ipad 2


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>