【问题标题】:Migrating contents of Windows Phone 7.5 IsolatedStorage to Windows Phone 8.1将 Windows Phone 7.5 隔离存储的内容迁移到 Windows Phone 8.1
【发布时间】:2015-03-02 09:31:47
【问题描述】:

我有一个 Windows Phone 7.5 游戏,它将用户进度存储在位于 IsolatedStorage 中的文件中。我现在计划将代码升级到 WP 8.1。我不希望用户在更新时丢失进度,因此我需要在更新后以某种方式将用户文件从 IsolatedStorage 迁移到新的 StorageFile/StorageFolder 系统。

但是,到目前为止,我找不到从 WP 8.1 应用程序访问 IsolatedStorage 的方法。请告诉我我错了。我错过了什么吗?

【问题讨论】:

    标签: windows-phone-8 windows-phone isolatedstorage


    【解决方案1】:

    独立存储文件夹通过 Windows 运行时公开为 LocalFolder。您可以在 Windows Phone 8 Silverlight 应用和 Windows Phone Runtime 应用中以相同的方式访问它。

    StorageFolder localFolder = ApplicationData.Current.LocalFolder;
    

    无需迁移。只要您的新应用作为对现有应用的更新发布,用户数据就会维护。

    请参阅:Local folder best practices for Windows Phone 8Accessing app data with the Windows Runtime

    【讨论】:

    • 我现在已经证实确实如此 - 谢谢!这一次,事情很简单。为了验证 7.5 中的 IsolatedStorage 数据是否在 8.1 中的 LocalFolder 中,我使用了 Windows Phone Store 的 beta 测试功能。我找不到任何其他方法来模拟从 7.5 到 8.1 的更新。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-07-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多