新版应用程序清除了设置 [英] New version of application cleared the settings

查看:56
本文介绍了新版应用程序清除了设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个发布到商店的桌面桥应用程序。每当我为其启用更新时,更新都会清除应用程序设置,例如用户选择的颜色方案。它没有为前几个更新做到这一点,但现在确实如此。如何在不清除应用程序设置的情况下启用
a新提交?


我正在使用My.MySettingsProperty.Settings。



Rick

解决方案

您好,


您是说您使用appdata保存了设置并且商店已清除您的设置吗? https://docs.microsoft.com/en-us/windows/uwp/design/app-settings/store-and-retrieve-app-data 


如果你是文件使用本地应用程序数据应该执行此操作"系统还会在用户安装应用程序更新时保留这些数据存储的内容,并在卸载应用程序时完全干净地删除这些数据存储的内容。" 


如果您没有在桌面应用中使用此API,我建议您使用UWP应用程序存储它并测试结果。


还有一个可能相关的注释:


关于应用数据的重要说明:应用数据的生命周期与应用的生命周期相关联。如果删除该应用,则所有应用数据都将丢失。不要使用应用数据存储用户数据或用户可能认为有价值的任何内容
且无法替代。我们建议使用用户的库和Microsoft OneDrive存储此类信息。应用数据非常适合存储应用特定的用户偏好,设置和收藏。


祝你好运,


Barry


I have a desktop bridge application published to the store. Whenever I enable an update for it, the update clears the application settings, such as the color scheme the user chose. It didn't do this for the first few updates, but now it is. How can I enable a new submission without clearing out the settings of the application?

I'm using My.MySettingsProperty.Settings.

Rick

解决方案

Hello,

Do you mean you've saved your settings using appdata and the store cleared your settings? https://docs.microsoft.com/en-us/windows/uwp/design/app-settings/store-and-retrieve-app-data 

Per the doc if you use local app data it should do this "The system also preserves the contents of these data stores when the user installs an update to your app and removes the contents of these data stores completely and cleanly when your app is uninstalled." 

If you haven't used this API from your desktop app, I recommend that you store it using the UWP app and test the result.

There is also a note which might be related:

Important note about app data: The lifetime of the app data is tied to the lifetime of the app. If the app is removed, all of the app data will be lost as a consequence. Don't use app data to store user data or anything that users might perceive as valuable and irreplaceable. We recommend that the user's libraries and Microsoft OneDrive be used to store this sort of information. App data is ideal for storing app-specific user preferences, settings, and favorites.

Best regards,

Barry


这篇关于新版应用程序清除了设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆