Hi,
Just wondering if anyone else can reproduce this. I was having a problem where every time I referenced a particular PCL, the iOS XF app referencing it would fail to start. Usually with an error about being unable to load a type from a Xamarin iOS assembly, on the Forms.Init line in the app delegate. WP projects worked fine, I don't have a license for Android at the moment so haven't tested that. I am working in VS 2013 on Windows with a Mac build host, but presume the same problem would apply regardless of IDE.
Here are my steps to reproduce (seems to be consistent for me);
Create a new Xamarin Forms project targeting iOS and WP (shared project template)
Add a new PCL project to that solution. I believe the problem occurs only if SL5 is targeted, but I can consistently reproduce error by choosing these platforms for the PCL; .Net 4.5, SL5, Windows 8, WP 8.1, WP SL 8, Xamarin.Android, Xamarin.iOS
Reference the PCL from both the iOS and WP projects.
That's it, no code changes required. Run the WP project - should start and show the default hello world page. Run the iOS project, I get one of two symptoms.
Most commonly, it breaks on Forms.Init in the app delegate with the error; System.TypeLoadException: Could not load type 'Xamarin.Forms.Forms+IOSPlatformServices' from assembly 'Xamarin.Forms.Platform.iOS, Version=1.2.2.0, Culture=neutral, PublicKeyToken=null'.
Sometimes the app appears to be deployed, the simulator screen goes black, and then the app and the debugging session stop with no error reported, and the simulator returns to the main screen.
I've tried this repeatedly with multiple 'new' projects. After trial and error with the PCL it seems that targeting SL5 causes it - I can target all the other platforms I listed and everything works, but if I include SL5 everything breaks.
Jut me - or does this happen for others?
Thanks.
Troy