jamesmontemagno / SettingsPlugin

Read and Write Settings Plugin for Xamarin and Windows
MIT License
324 stars 80 forks source link

Settings don't retain on application update for desktop apps (WPF) #166

Open ajaywhiz opened 3 years ago

ajaywhiz commented 3 years ago

Bug Information

Version Number of Plugin: 3.1.1 Device Tested On: Windows 10 build 1903 Simulator Tested On: Version of VS: VS 2019 16.8.5 Version of Xamarin: Versions of other things you are using: .NET Standard 2, WPF, .NET 4.7.2

Steps to reproduce the Behavior

Expose settings from a library built on .NETSTANDARD 2.0 Consume it in WPF application Install the application Have the application save some settings Update the application by running the installer

Expected Behavior

The application should be able to read the settings saved by previous version.

Actual Behavior

The path to save the settings changes every time a new version is built. This results in failure of retaining the settings saved by previous version of the application

Code snippet

Screenshots

image

jamesmontemagno commented 3 years ago

Hmmmm I use -> https://docs.microsoft.com/en-us/dotnet/api/system.io.isolatedstorage.isolatedstoragefile.getuserstorefordomain?view=net-5.0 so not sure how to change that.

I am open to changes @Clancey I think added this originally....

Clancey commented 3 years ago

Switching it to https://docs.microsoft.com/en-us/dotnet/api/system.io.isolatedstorage.isolatedstoragefile.getuserstoreforapplication?view=net-5.0 might fix it? I am unsure.

ajaywhiz commented 3 years ago

are you planning to try out getuserstoreforapplication? @jamesmontemagno / @Clancey