In my solution created with MonoDevelop (3.0.3.5) I have 3 projects:
The Portable Library project won't compile, and shows warning symbols on the references (System, System.Core, System.Xml) in MonoDevelop. When I unfold the assembly reference, the following error message is shown:
Assembly not available in .NETPortable 4.0 Profile1 Profile (in Mono 2.10.9)
Same problem reported in this forum thread.
Does anyone have the same problem and is able to solve it?
Update
Demo solution with the build errors can be found on GitHub here (bgever/plp-build-error).
I found out that although the error messages are shown, basic code can be compiled and works as expected.
However, the two variants of build errors preventing the demo solution from compiling are:
public T Get<T> (Expression<Func<T, bool>> predicate) where T : new() {
Using the generic type
System.Func<T1,T2,T3,T4,T5,T6,T7,T8,T9,TResult>' requires
10' type argument(s) (CS0305)
So it seems that the 2 argument generic overload Func<T, TResult>
is not supported?
public void RunInTransaction (Action action) {
Using the generic type
System.Action<T>' requires
1' type argument(s) (CS0305)
So it seems that the non-generic version of Action
cannot be found?
With the additional error messages, I've found the following SO question: MonoDevelop: is it possible to switch PCL's compiler? With the answer from @mhutch provided, the MonoTouch compiler can be enforced and is then able to compile the code.
However, this is just a workaround, therefore, still it would be great to see proper Portable Class Library support in Mono, MonoDevelop and MonoTouch.
If you need proper Portable Class Library support too: vote for this feature on Xamarin's UserVoice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With