>>So if i reference dll's in MonoDevelop
>>-BUT- the project is a simple .NET4.0 class library..then there should be
no problems
Incorrect - sorry :-(

To avoid confusion, **don't reference DLLs at all** (there are caveats to
this if they're already built for the correct platform, but for now just
don't do it).

Instead, add the .NET code (that's in your DLLs) to your MonoTouch and
Mono-for-Android solutions, so that they are compiled along with your MT or
MfA project.

>>so my MT solution will have a number of projects in it -> one being the
MonoTouch iPad project.
Yes!!

There are a few ways to include/share c# code & projects (none of which are
currently 'perfect').
1) create a new "MonoTouch Library Project"/"Mono for Android Class
Library"  (csproj) file and add all the .cs files to it.
2) 'add as link' all the .cs files into your MT or MfA project (or another
Library Project)

You could download and check out our MWC Conference sample app from
https://github.com/xamarin/mobile-samples/tree/master/MWC
which shares a "Core Project" across iOS/Android/WindowsPhone using these
methods. It does NOT reference a pre-built DLL ~ it includes the same c#
files in each different solution so they get compiled for the specific
platform.

Downsides of this approach include refactoring in one solution will result
in changing the shared code and possibly breaking on the other platforms.
Something to watch out for.

HTH
craig

p.s.
>>if that's right, then will MT even consider changing it so that the iPad
app
can reference those projects in the future, instead of the .dll's ?

there is such as thing as Portable Libraries but that is a way off, so for
now you need to compile against the target platform.



On Mon, Mar 26, 2012 at 2:48 PM, Pure Krome <
pure.kr...@world-domination.com.au> wrote:

> Hmm. ok. this is confusing. :blush:
>
> Sorry - i'm a real newbie at this, so apologies for my really simple
> questions.
>
> >>What Sebastien is saying is that a DLL built in VS.NET is not compatible
> with MT.  You have to build the library with MD/MT.
>
> Hmm. ok. So if i reference dll's in MonoDevelop -BUT- the project is a
> simple .NET4.0 class library .. then there should be no problems.
>
> BUT, if i want to use a dll built in VS.NET with a MonoTouch app (eg. iPad
> app) .. i need to build the source with MD (even though the source code is
> in another solution .. it's just that MD has compiled it into it's own MD
> compat dll) and then go back to my own solution, and add a reference to
> that
> new dll (which was created in the other instance of MD) ?
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/Newbie-iPad-application-and-incompatible-target-frameworks-tp4503021p4504708.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> MonoTouch@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
_______________________________________________
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to