This project has moved and is read-only. For the latest updates, please go here.

Latest version ViewModelBase in in data still not serializable

Apr 3, 2011 at 12:46 AM

I'm hooked on MVVM Light Toolkit so great work!

I'm working on a WP7 app and need to tombstone the data. When using the current stable version with the ViewModelBase I got the 'not serializable' error. I tried the latest version cd110ba734ea for 'serializablility' but because i have lists of data that also inherit from ViewModelBase I still get the error of ViewModelBase is not serializable because of not having a parameterless public constructor. Now I checked in the source of the ViewModelBase and it does have the correct constructor. But when I moved the NotifyPropertyChanged base class into the ViewModelBase class the tombstoning starts to work. I don't get to much more exception error info so this is the extent of the information.

Apr 3, 2011 at 7:20 AM

Oh yeah, it's because I am a stupid idiot ;-) I was so happy to have fixed the bug, and then I went ahead and made the constructor of the NotifyPropertyChanged class protected. Old habits die hard.. Oh well, This is what preview versions are for, right? ;-) I'll fix that soon (again...)



Apr 3, 2011 at 1:29 PM

Don't be too hard on your self: we're here to keep you sharp ;)

Apr 6, 2011 at 9:25 PM

Hi again,

I just tested against two different serializers, and it worked fine (one JSON serializer and one binary serializer).

Before I test further, can you tell me which serializer it failed into?