WPF/MSIX application settings not getting updated when new version of the app is installed

Copper Contributor

I have a WPF app that I'm packaging and publishing (side-loading) with MSIX. Application settings are saved in a class that's derived from ApplicationSettingsBase. When the app is installed and runs, those settings are saved to disk in user.config in a directory something like:


C:\Users\...\AppData\Local\Packages\eb585c83...\LocalCache\Local\WpfApp1\WpfApp1_Url_0h0wlkyvmedald25z34yc2xsbwcm4nil\ is the app's version number. If I create a new version of the app, for example, a new user.config is created but the settings from version are not copied to the new user.config. The new user.config is in a new directory like:




It sounds like ApplicationSettingsBase.Upgrade is supposed to update the new config with settings from the old version but it's not working. If I put the directory in the same directory as, then the upgrade works. 


If I use Visual Studio's "Deploy" feature, the version directories are in the same parent. I.e. it works. It's publishing/side-loading that has a problem.


Any idea what could be wrong?

4 Replies

Hi @ChuckBohling, what version of Windows are you testing on?  

Hey @ChuckBohling 

I was looking up what might be happening, and found this post.  Saving User Settings on Version Update (microsoft.com)


The comment towards the end suggests that if you are switching between debug and retail the paths may not be the same.   Can you verify that both apps are built retail?





@KevinLa_ms Thanks for the finding that post. Unfortunately, it didn't help.


For my tests, I used Visual Studio 2019 and published (side-loaded) my app as MSIX. The app was built in release (retail?) mode. I first built, published and installed version then built, published and updated version After the update, my LocalCache has two user.config files ( and but in different directories.