Search code examples
mergesettingsupgradedesktop-bridge

Desktop Bridge - Upgrade Settings not working


I am trying to upgrade the user settings if my app gets updated. I am storing settings ins
Properties.Settings.Default. As suggested in other answers a way to merge settings between version is to can create a bool setting UpgradeRequired and do the following.

if (Properties.Settings.Default.UpgradeRequired)
{
Properties.Settings.Default.Upgrade();
Properties.Settings.Default.UpgradeRequired = false;
Properties.Settings.Default.Save();
 }

I tried to make a minimum example with this code in a desktop bridge app without any success. Does this method not work for them?


Solution

  • Yes, unfortunately this does not currently work in desktop bridge apps. This is a known bug that the team is aware off.

    As a possible workaround you could move to the new localsettings API in your desktop bridge app: https://learn.microsoft.com/en-us/uwp/api/windows.storage.applicationdata.localsettings#Windows_Storage_ApplicationData_LocalSettings