English 中文(简体)
Single code base for monodroid, WP7 and silverlight
原标题:

I ve been playing about with the monodroid (preview 8980) and I m trying to create an application that will run on Android, WP7 and silverlight.

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

The main problem with this is that it will be possible to implement some functionality in the core library that will work fine on silverlight, but not on WP7 for instance. I believe the best way to make sure this doesn t happen is by making the core library a silverlight 3 project, as this will be the lowest common denominator.

The problem I am facing now is that I can t reference a SL3 library from the monodroid project. I get this warning - Warning 2 The project TMCore cannot be referenced. The referenced project is targeted to a different framework family (Silverlight)

Any ideas?

最佳回答
问题回答

according to

http://monodroid.net/Documentation/Assemblies

you must compile your core-stuffe into a seperate assembly you cannot share a core-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).




相关问题
System.Json namespace missing from Windows Phone 7

During a Mix10 presentation, the presenter (Charlie Kindel) said that when writing Silverlight based apps for WP7 you get all of Silverlight 3.0 with some of Silverlight 4.0 mixed in. Why then is ...

Will Windows Phone 7 Support Multitasking third party apps

Obviously it s early days, I do not know whether this is information that is in the public domain or not yet, but... I have trawled through some of this site - http://www.windowsphone7series.com/ but ...

Windows Series Phone 7 "Cloud"

I have been reading up on "Cloud computing" on here and still not getting it. Basically I want to develop for the WP7 http://msdn.microsoft.com/en-us/library/ff402531%28v=VS.92%29.aspx#...

Windows Phone 7 Tab Pages (page cycle)

I know.. I know, it s only a few hours old. But how the hell do you get the little page tabbing/cycle (forgot what the official name is) on the top of the page under the app title. MIX Keynotes made ...

Recording audio from the microphone in Windows Phone 7 Series

I m wondering if anyone has any code samples or links to documentation that demonstrate how to capture audio from the device s microphone on the new Windows Phone Series 7. I ve recently downloaded ...

Resources for Windows Phone 7 development [closed]

Windows Phone 7 has been unveiled and MS have announced all details of the development chain at the Mix10 conference. So this could be a good starting point/collection of online resources as they ...

热门标签