I am having problems getting my app to restore/load from start after tombstoning.
It fails at the following line:
ServerCollection collection = AppSettings.GetSetting(AppResources.settings_servercollection) as ServerCollection;
This line is in a function that is called inside Launching and Activated.
The AppSettings class is this class Here:, but I modified it to use a object instead of a <T>.
The debugger does not seem to enter the AppSettings function. It also displays the string i’m expecting to key on (AppResources.settings_servercollection), so I do not think that is the problem either.
Lastly, no exceptions are thrown. I have the entire section in a try, and breakpoints inside UnhandledException and NavigationFailed of the application, but I never seem to arrive at any of them.
Has anyone else experienced this before, or know what the cause might be?
Edit: Just wanted to point out that of course the app works after Cleaning/Rebuilding/Reinstalling etc.
Edit: I’ve been able to isolate it to this:
IsolatedStorageSettings Settings = System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings;
I found that out by placing it in each the Get/Set functions of AppSettings, and seeing it die directly on that line after entering the function. That said, Any ideas?
The serialization turned out to be working Okay. The real problem was that I had some infinite recursion going on in a property that I was saving.
As you can probably see, that was not going to end well. Too bad there wasn’t a “StackOverflowException” or anything like there is in the console C# applications i’ve written before.
Anyway, thanks for the help.. Hope anyone else who has this problem may find this helpful.