Files in IsolatedStorage keep getting deleted. Is that expected?
I’m storing user state in an xml file in IsolatedStorage. 开发者_运维技巧 When I run my app in the emulator I notice that these files often disappear. Everything works fine when the app is running – it seems to be when the app restarts (it happens when if keep the emulator open or not).
Is Windows deleting my files in IsolatedStorage to save space? Should expect this behavior on the actual device or is this just an emulator bug?
Thanks,
Isolated Storage being deleted is normal, if you close the emulator completely. If it's being deleted on start (without the emulator closing), it sounds like your code is causing the file to either be deleted or overwritten. Could you post your code of any IsolatedStorage activity during the startup of your application?
Isolated Storage will also be wiped if you do a rebuild of your solution in Visual Studio. Rebuild triggers reinstall and install which wipes on the app's isolated storage.
精彩评论