[mono-android] [MonoTouch] sharing code between mono touch and mono for android

James Briant jamie at binaryfinery.com
Tue Feb 28 04:34:05 UTC 2012


On Mon, Feb 27, 2012 at 8:03 PM, Felix Collins <felix at intranel.com> wrote:

>
>
> On 28/02/2012 4:48 p.m., James Briant wrote:
>
>> Yes they can be, but the examples from the book aren't, nor are the ones
>> from FlightsNorway. If they /are/ in the same solution, it doesn't help
>> refactoring at all, because there are two separate project hierarchies:
>> refactoring Library.Droid will change the files in App.Droid, and also in
>> Library.MT (because the are the exact same files as Library.Droid), but it
>> wont do the refactoring in App.MT. So, they might as well be in separate
>> solutions. And in fact, having them all in the same solution /completely
>> fucks up Intellisense/ and Resharper's Code Dom. Whole Solution Analysis
>> (in R#) that I totally rely on to make sure my MT projects will actually
>> compile when switch to the Mac, is completely broken by having the same
>> file in two different projects.
>>
> Sounds like a feature request for JetBrains.
>

Its not something that they can reasonably solve without a complete model
change, and then I suspect that they would still run into the fundamental
problem that Visual Studio itself will not open the same file twice, in the
context of two different projects. That's the infamous "This file is open
in another project" error.

These problems are just indicative of the fact that this solution is
totally ad hoc. There is a way to do target specific programming in an OO
language, and it is shared libraries with platform specific code in
platform specific libraries. The problem is that Microsoft totally fucked
us over by making it so that projects cannot target multiple platforms.
Since its impossible to do, people then figure, "Well if I'm fucked anyway,
I might as well start doing other things like using partial classes and #if
to include platform specific code". This is not sound.



>
>> The MT app can be in the same solution, btw. You just need something <
>> https://github.com/**jamiebriant/VsMono<https://github.com/jamiebriant/VsMono>>to
>> fool VS into loading it, and a hacked version of monotouch.dll that claims
>> to be .NET 4. Then you can use R# Solution Analysis to catch errors as you
>> type: if R# says there are no errors, MonoDevelop will compile it on the
>> Mac 99.99% of the time. I edit my MT apps on windows.
>>
>>  I think I'll have to do that (are there step by step instructions
> somewhere?).  My brain hurts trying to learn all the different keybindings
> on the mac despite having hacked as many as possible.  I use the
> alt-<firstletter> key mnemonics in windows all the time and that plays
> merry hell on a mac!


More details here:
http://blog.binaryfinery.com/pages/monotouch-visual-studio-productivity



>
>
> Felix
>
> ______________________________**_________________
> Monodroid mailing list
> Monodroid at lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/**mailman/listinfo/monodroid<http://lists.ximian.com/mailman/listinfo/monodroid>
>



-- 

jamie briant

founder | binaryfinery | mobile, social, cloud, apps

www.binaryfinery.com | blog.binaryfinery.com | about
jamie<http://careers.stackoverflow.com/jamiebriant>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodroid/attachments/20120227/d33be90b/attachment.html>


More information about the Monodroid mailing list