Bugzilla – Bug 5329
System.Action and System.Func overrides needed in Portable Class Library profiles
Last modified: 2014-03-07 09:57:07 EST
I'm currently continuing to try to build "portable class libraries" or
"portable library projects" for cross platform development.
When I try to create any class library which uses System.Func or System.Action,
then MonoDevelop always complains about the delegate requiring between one <T1>
and ten <T1, ... T10> type arguments.
- use MonoDevelop 3.0.2
- create a new portable library project
- in the generated myClass.cs file, use constructor
- hit compile and the error messages are along the lines of "Using the generic
type 'System.Func<T1, T2,...., T9, TResult>' requires '10' type argument(s)
If it helps at all when you look at this bug, then I've seen similar issues
when coding the portable libraries and MonoTouch projects within VS2010 using
These have generally been resolved by tweaking the way the project links to
mscorlib using instructions from
But not sure that will help...
When building the PCL, these diferences occur:
mscorlib resolves to /Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll
but is built with
As in the comments:
Current stable mcs can only build against the mscorlib that it's running on.
This makes it ~impossible to build against arbitrary frameworks such as PCL.
The MonoTouch mscorlib has the Action and Func<T>, but the Mono framework does
The end part of that comment is:
To fix this, you'll need to update to Mono 2.12, which is currently in alpha.
You're probably running into bug 6649.
You can find a workaround here: