I get this fun error when I try adding a local database to my Windows Phone 8 project.
The type 'System.ComponentModel.INotifyPropertyChanging' exists in both 'e:\users\keenan\Documents\Visual Studio 2012\Projects\MAL.WindowsPhone\packages\Portable.MvvmLightLibs.4.1.27.1\lib\wp8\GalaSoft.MvvmLight.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhone\v8.0\System.dll'
Why is System.ComponentModel.INotifyPropertyChanging
in the WP8 libraries of the MVVM Portable NuGet package? Is this a bug, because I think it conflicts with what is already in the mscorlib of Windows Phone 8.
Please help.
Please try the latest Portable.MvvmLightLibs (4.1.27.3). I had to remove INotifyPropertyChanging from the PCL version as there's really no way to get it to work properly across platforms.
We'd need Microsoft to provide a shim (similar to Microsoft.Bcl) for this so that it'd be picked up correctly on WP.
If you need property changing notifications (before the value changes - this is very uncommon and few things use this), one option could be to create your own interface and implement it in a derived type from ObservableObject (you can override the RaisePropertyChanging methods to know when to raise your own event).
If Microsoft adds support for INotifyPropertyChangning in PCL's, I'll certainly add it back to MVVMLight.