Question

I am trying to build a cross platform application. Currently I am setting up a project using Xamarin MonoDroid 4.7 and MVVMCross. I would like to be able to use INotifyDataErrorInfo but I get the following compilation error:

The type 'System.ComponentModel.INotifyDataErrorInfo' exists in both 'c:\Program Files(x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll' and 'c:\Users\MvvmCross.PortableSupport.3.0.6\lib\MonoAndroid16\System.Windows.dll

Has anyone come across this/developed a workaround or solution?

Thanks

Was it helpful?

Solution

We think Mono for Android/Xamarin.Android has recently added this support - but the situation isn't clear - see https://bugzilla.xamarin.com/show_bug.cgi?id=5340

When we get this confirmed and work out which versions do/don't have this - which is hopefully in the coming week or two - then MvvmCross will hopefully be able to remove its version.

Also, I hope but I don't know that the MvvmCross versions of System.Windows, System.Net, etc can be removed in the near future - see https://bugzilla.xamarin.com/show_bug.cgi?id=8035

This is not at all clear at present, and it's likely to be a source of issues while PCL support from Xamarin moves through none->alpha->beta->stable

I'm afraid those 'NEW' bugzilla issues above represent all the information I have on this at present.


In the meantime... if you need to resolve the INotifyDataErrorInfo within your own project and environment, then one route forwards is to branch the MvvmCross source and to change the MvvmCross shim System.Windows.dll to type forward instead of replacing this type - the code is in https://github.com/slodge/MvvmCross/tree/v3/PortableSupport/System.Windows

I am sorry about these problems... and I'm very much looking forwards to having official PCL support from Xamarin so I no longer have to work around them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top