On May 17, 2012, at 11:55 AM, James Lavery wrote:
> I think I've found the source of my problem.
> 
> I have references to other projects in my solution which are not targetting 
> .NET Framework 2.0. Changing them to target .NET Framework 2.0 solves the 
> problem.

That's masking the problem, not solving it. You cannot reliably reference any 
assembly that wasn't compiled against a Mono for Android profile assembly.

> Does this mean that we can't use any features of .NET Framework which are 
> available in a later .NET Framework version in a Mono For Android application?

You can use LINQ, expression trees, variant generics, dynamic, XLinq, etc. In 
short, you can use everything including C#4 features, though the classlib side 
of things will be missing (e.g. the compiler supports variant generics, but 
IEnumerable<T> is invariant).

The problem is the assemblies, types, and members which are provided: we 
provide a _subset_ of desktop .NET, following the desktop .NET assembly names. 
Thus we have the System.Net namespace in System.dll (like desktop .NET), not 
System.Net.dll (like Silverlight/WP7). At the same time, we're missing ~all of 
System.Configuration, so compatibility with desktop .NET is out the window.

The sanest way to go is to create Mono for Android-specific projects, Link 
files into them, and build your code against the Mono for Android assemblies.

We realize this is less than ideal. We are exploring PLP support for a future 
release.

 - Jon

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to