We are starting a cross-platform project to be deployed to Android and iOS. Obviously, a lot of code is to be shared between the two, and some of the code relies heavily on
Mono does not yet have an implementation of the actual PCL libraries. For now, it has a dummy Microsoft.Portable.CSharp.targets file that instead overrides the framework and targets to build the library against MonoTouch, Mono for Android or .NET 4.0, in that order, depending what's installed.
It looks like there's bug in the codepath that uses the MonoTouch framework - it's using the default common targets, Microsoft.CSharp.targets, without overriding the compiler to use the MonoTouch-specific version of the C# compiler. This is necessary because Mono's C# compiler is currently framework-specific (though this is fixed in Mono 2.12, which is in alpha).
You may be able to fix this by editing the file /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild/Microsoft/Portable/v4.0/Microsoft.Portable.CSharp.targets
, finding the PropertyGroup that sets
<TargetFrameworkIdentifier>MonoTouch</TargetFrameworkIdentifier>
And to it, adding the lines:
<CscToolExe>smcs</CscToolExe>
<CscToolPath>/Developer/MonoTouch/usr/bin</CscToolPath>
I know this is an old question, but it appears that Portable Class Library (PCL) support was added to Mono in version 3.0.x, see the Release Notes for details, particularly version 3.0.8 :
Added PCL support to xbuild, mono’s MSBuild implementation.