PCLs do work well in MonoTouch and MonoDroid.
However, sometimes, when I use a variable to reference a Type in a PCL, and then I try to use that same reference in a MonoX client, then the compiler fails with a message like:
The type 'System.Collections.Specialized.INotifyCollectionChanged' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
The problem here is that in MonoDroid my System.Collections.Specialized.INotifyCollectionChanged
PCL is provided in a shim Type Forwarding DLL - like https://github.com/slodge/MvvmCross/tree/vnext/Cirrious/System.Windows - and obviously that DLL cannot be signed using Microsoft's Private Key.
Some more info:
- This is commonly seen for interfaces like ICommand and INotifyCollectionChanged
- It only seems to occur in .exe projects (libraries somehow work OK)
- I'm mainly testing/building in VS2010 and VS2012
- some more at: https://github.com/slodge/MvvmCross/issues/41
Can anyone suggest any way to resolve this? e.g. is there a way of turning the strong assembly naming protection off?
I think this is needed if PCLs are to be truly Portable outside of Microsoft shipped .Net implementations?