All files in IsolatedStorageFile store disappear a

2019-08-27 22:21发布

I'm developing a WP8 Silverlight app which uses the IsolatedStorageFile store for app's data. At some point I detected that if I issue the Rebuild Solution command in VS.NET, VS uses full deployment of my project to the emulator or an attached device instead of incremental deployment. The typical Build output in this case looks like this:

2> Connecting to Emulator 8.1 WXGA 4.5 inch...
2> The application is already installed on the device. Checking if an incremental deployment is possible...
2> Doing full deployment as project was cleaned and rebuilt...
2> Uninstalling the application...
2> Installing the application...

Sure, all app's settings and data stored in IsolatedStorageFile disappear at that.

As a developer, I may need to rebuild my solution from time to time, or unpack it from the archive backup I do. But this means that my end users will lose all their data too when I publish a new version of my app in the Marketplace after rebuilding the project!

My question is how to save all the data on the device after deploying a rebuilt WP8 Silverlight project to it? Is there a file, or a setting in one of the files produced while compilation responsible for that (maybe, a GUID, or time stamp)? Which can be saved and added to the new rebuilt stuff to prevent data loss with the next app deployment?

2条回答
仙女界的扛把子
2楼-- · 2019-08-27 22:43

An alternative solution to this problem is the IsoStorSpy utility suggested by the user lisp in this thread.

Using this utility, we can store all app files in the corresponding IsolatedStorage data area to the pc HDD, and then easily upload them back after deploying the rebuilt app.

查看更多
三岁会撩人
3楼-- · 2019-08-27 22:51

IsolatedStorage data are deleted whenever the app is uninstalled, which is exactly what VS does when you rebuild the project. This will not be the case when end users will update your app. The app will be updated rather than uninstalled. So that will preserve your data from IsolatedStorage.

查看更多
登录 后发表回答