I use the Application.Current.Properties
for persistent storage regularly. I've never had a problem with them.
Now all of a sudden, in my UWP app, the properties are persisting despite the application being uninstalled and deleted.
When launching in debug mode, in the project properties I have "Uninstall and then re-install my package.
All information about the application state is deleted" checked.
Yet, when I launch the app, all the values in the Application.Current.Properties are still there!
I use Application.Current.Properties.Clear()
when launching the application, to no avail.
After await Application.Current.Properties.SavePropertiesAsync()
I get the following exception:
Error HRESULT E_FAIL has been returned from a call to a COM component.
at Windows.ApplicationModel.LockScreen.LockApplicationHost.GetForCurrentView()
at Xamarin.Forms.Platform.UWP.WindowsBasePlatformServices.get_IsInvokeRequired()
at Xamarin.Forms.Application.<SavePropertiesAsync>d__60.MoveNext()
This has never happened before. Does anyone have any ideas?