Unified codebase for monodroid, WP7 and Silverlight

I play with monodroid (preview 8980) and I am trying to create an application that will work on Android, WP7 and silverlight.

My plan is to create a single base class library, and then a separate project for each of the platforms that will contain UI material - so one monodroid project, one for WP7 and SL one, all of which will refer to the core of the class library .

The main problem is that in the main library some functionality will be implemented that works fine on Silverlight, but not on WP7, for example. I believe that the best way to make sure that this does not happen is to make the base library a silverlight 3 project, as this will be the lowest common denominator.

The problem I'm currently facing is that I cannot reference the SL3 library from the monodroid project. I get this warning - "Warning 2 The TMCore project cannot be referenced. The linked project targets another family of frames (Silverlight) '

Any ideas?

+5
source share
2 answers
+5
source

according to

http://monodroid.net/Documentation/Assemblies

you must compile your basic information into a separate assembly, you cannot use the kernel-dll.

> Note: MonoDroid is not ABI compatible with existing assemblies compiled for 
> a different profile.  You must recompile your source code to generate 
> assemblies targeting the MonoDroid profile (just as you need to recompile 
> source code to target Silverlight and .NET 3.5 separately).
+1
source

All Articles