PCL support is really getting close to being good now - and I've gotten a long long way with building lots of code cross-platform.
However, there are a couple more small problems/issues I'd like to try to discuss with your team - but I'm not sure how to do it?
The problems are basically all to do with the special Microsoft namespaced Assemblies - especially System.Windows and System.Net.
I've worked around these Assemblies using Shim DLLs which use type forwarding to the MonoTouch locations of the classes (e.g.see https://github.com/slodge/MvvmCross/tree/vnext/Cirrious/System.Windows)
However, there are 2 problems with these DLLs:
1. When building in MonoDevelop then the System.Net Assembly tries to give friend access to the full Mono System.Net DLL - see http://forums.xamarin.com/discussion/195/building-a-system-net-surrogate-dll-under-monotouch-avoiding-a-friend-access-clash#latest
2. When building on Windows (using VSMonoTouch) then there are some 'strong naming' problems which can occur if you reference a Type in both PCL and native code. For and example of this, see https://github.com/slodge/MvvmCross/issues/41
I'm sure there must be an easy workaround for 1 using some patch on the MSBuild files - but I haven't worked it out yet.
For 2, I've discussed the problem with @dsplaisted on the BCL/PCL teams at Microsoft - he suggested that there are some possible workarounds to do with code signing - see http://stackoverflow.com/questions/13028321/portable-class-library-strong-assembly-reference-problems-in-monotouch-monodroid
He also suggested that Microsoft could perhaps provide signed Shim Assemblies - which I think would help
Sorry this is a bit long as a bug report. If you need more specific information please ask.
I believe we should provide a System.Net.dl shim assembly - we moved the types thus we must ensure callers of the old assembly can still access those types.
In the meantime time you can probably sign your System.Net.dll as we do it ourselves, using ecma.pub and mono.snk from here: https://github.com/mono/mono/tree/master/mcs/class
Please excuse my ignorance on this one. I've read up a little on this, but I've never actually signed a DLL in my life!
I think the problem I'm seeing is that when building in VS, I need the shim DLLs to be signed by Microsoft - so I'm not sure that Xamarin can provide the shim DLLs without Microsoft? Or have I got this wrong?
If you need the Shim DLLs, then both the System.Net and System.Windows are available MS-PL in the MvvmCross source - or I'm happy to use a different license if that helps
I believe you can delay-sign the shim assembly so that the compiler doesn't complain (but it would fail if used with their runtime).
I've tried to get this working...
But I just don't really know what I'm doing here...
So I'm going to put a pre-built dll in place that others can use with mvvmcross.
If there's anything I can do to put PCL support a bit higher on the Xamarin's priority list, then please let me know. I'll also keep trying to work with dsplaisted and davkean to keep Microsoft assisting in this process
Thanks - and sorry for being incompetent at delay-signing and certificate-digging...
We have a solution to this - or at least a very good workaround now - see @dsplaisted's notes in http://slodge.blogspot.co.uk/2012/11/thanksgiving-post-thanks-for-more.html - checked in to https://github.com/slodge/MvvmCross/commit/f6a88048467838e5ac5ca687744dc0b2d1958aa8.
So we can close this issue now if you like :)
Alternatively... I'd still be interested in somehow getting these Shim DLLs back into MonoDroid (and MonoTouch) somehow at some point if there's any interest.
Correction: we have a solution to the strong naming part of this bug report.
The other part - the friend access for System.Net - we only have a rather nasty workaround for - we basically have to build the dll and then rename it - which means that the project referencing doesn't work as well (http://forums.xamarin.com/discussion/195/building-a-system-net-surrogate-dll-under-monotouch-avoiding-a-friend-access-clash#latest)
Given the imminent release of PCL support... is there any update on this?
The forthcoming 4.7.6 release will have improved PCL support, but I don't think that it'll be "complete" PCL support...
Martin, I believe this is your area now.
The latest Mono 3.0.12 contains these assemblies, so you don't need to compile them yourself anymore.
If you still want to build them manually, look at how I implemented it here: