Hi

On 2012.02.27 14:13, Jamie Briant wrote:
Is this as good as it gets? I'm attempting to build an MfA version of my MT app and its proving extremely frustrating, to the extent that I'm considering just writing the thing in Java. My reason for using MT was the awfulness of Objective-C, and while java is frustrating its entirely doable. The only thing at this point is the real possibility that a WP7 version will be next, so I might as well bite the bullet now.

Context: I'm using Visual Studio, Resharper, and my own Monotouch VSIX to load MT projects. I edit entirely in VS, and build in MD on the mac. I've tried Project Linker.
I'm digging my way towards MT and will try Your extension in next days...

Problem: MfA, MT and WP7 require different .XXproj file formats.

There's no getting around this for WP7.

Why is this a problem?

1. "This file is open in another project". (and associated Intellisense death)
OK. I get this warning, but no intellisense death.
If I try to open linked file (Project Linker) in M4A project it pops this error and opens file in WP7 project! This is annoying, cos I have "tracking active item in explorer" set to true,
making VS Explorer moving...

OK. I'm not using Resharper. Almost year ago I had bunch of weird problems with VS plugins and
extensions -  right now have only bare minimum...

2. Refactorings don't refactor #if/#endif code.
3. Refactorings don't refactor code in linked projects at all.
4. Resharper completely horked.

Ok. Right now: pls don't get angry, but could You try to disable ReSharper for a while.
It may have problems with getting the intellisense info from linked files


Basically, I cannot work the way I work. And if I can't do that - if I can't keep the apps in sync /as I work/ I might as well use java: if I have to retype the code I can just as easily convert it to java as I type.

Project Linker doesn't solve any of these. It makes things slightly less broken, but the flip side is I managed to delete a whole ton of files off disk as I tried to remove them from the MfA project.
I managed to do something similar even without ProjectLinker.

Source Control as an alternative. I thought about having separate branches and handling it that way. But this fundamentally fails for refactoring often. It made me wonder how on earth teams of programmers collaborate. When I decide to take a class, split it into two and then pull out a common base, all with new names: how does a team deal with that? I refactor continuously.

*A Possible Solution*

Could the MT and MfA compilers/linkers/projects be made to accept WP7 projects as References?
    Probably no.
    Tested WP7 added as reference to M4A:
    after adding:
Warning 1 The project 'HolisticWare.PhActEx_2011.DLL_211_BL_mClnt_WP7_SL4_netfx4' cannot be referenced. The referenced project is targeted to a different framework family (Silverlight)

    Compiles - ok.

    Runtime - not tested...

Then I could factor out common code into a shared library - but it would claim to be WP7 so the WP7 app could use it. The MT and MfA apps would ignore the fact that the library is WP7. MT could solve any problems at code generation time anyway.

*Pain*

How do the rest of you do this? Is Project Linker as good as it gets?
Our team does not use ReSharper, so Project Linker is quite good for us.
Most of our projects (currently 4 of 5) are smaller proof of concepts, being prepared for real coding. (Right now I do mostly logistics/infrastructure stuff - for example yesterday I have integrated DroidDraw into VS as external tool, so that axml files
are automatically loaded...
I'm writing small writeup (the code is not in DraidDraw release yet)

The only one bigger project (40k LOC, SNMPsharp lib) which was ported to M4A as proof of concept is beeing transformed (code refactored) into solution (single sln file + ProjectLinker) with targets for MT, M4A, SL and WPF. Its original project was WPF only!
This is in-house project for one company so I'm not entitled to say more...
We are trying to convince them to switch to mobile apps (they have use cases) an to buy
licences...
How do you deal with intellisense/resharper being completely horked?

Cannot tell
I'll try You extension on this new/bigger project and report my experience

regards

mel

Thanks,

jamie




On Mon, Jan 30, 2012 at 11:30 PM, Miljenko Cvjetko <[email protected] <mailto:[email protected]>> wrote:

    Good morning

    On 2012.01.31 01 <tel:2012.01.31%2001>:59, Felix Collins wrote:
    What is Project Linker?
    Byproduct of Patterns and Practices project called Prism where MS
    guys explain
    code sharing on WPF, SL and lately  WP7 platform.
    Project linker is just a tool VS plugin that helps batch linking
    of files. Defines
    project dependencies in sense of code sharing (copy as link +
    paste or copy + paste as link)

    some refs:
    http://msdn.microsoft.com/en-us/library/ff921108(v=pandp.20).aspx
    <http://msdn.microsoft.com/en-us/library/ff921108%28v=pandp.20%29.aspx>
    
http://visualstudiogallery.msdn.microsoft.com/5e730577-d11c-4f2e-8e2b-cbb87f76c044

    Greg's sample with M4A
    
http://www.gregshackles.com/2010/12/shared-libraries-for-windows-phone-7-monodroid-and-beyond/

    I like the tool, cos it is nonintrusive regarding IDE tools, does
    not break VS (other plugins) and
    works with MonoDevelop too (meaning one can do the linking in VS
    and all links are picked up).

    Right now besides integrating MTch stuff I'm trying to extend our
    MultiTarget solution template to
    include Project Linker stuff from the beginning, so the manual
    addition of links is not necessary.

    HTH

    regards

    mel


    On 31/01/2012 12:46 p.m., Miljenko Cvjetko wrote:
    Sharing code with Project Linker


-- Miljenko Cvjetko dipl.ing. ET
        Direktor/CEO
        Projektant rjes(enja/Solution Architect 
        Razvojni programer/Senior developer
        Voditelj projekta/Project Manager

    IX juz(na obala 13
    Kajzerica Zagreb
    T: 385 1 7775555
    M: 385 91 557 447 3
    F: 385 1 7779556
    e:[email protected]  <mailto:[email protected]>
    w:http://www.holisticware.net


    _______________________________________________
    MonoTouch mailing list
    [email protected] <mailto:[email protected]>
    http://lists.ximian.com/mailman/listinfo/monotouch




_______________________________________________
Monodroid mailing list
[email protected]

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


--
Miljenko Cvjetko dipl.ing. ET
        Direktor/CEO
        Projektant rjes(enja/Solution Architect 
        Razvojni programer/Senior developer
        Voditelj projekta/Project Manager

IX juz(na obala 13
Kajzerica Zagreb
T: 385 1 7775555
M: 385 91 557 447 3
F: 385 1 7779556
e: [email protected]
w: http://www.holisticware.net

_______________________________________________
Monodroid mailing list
[email protected]

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

Reply via email to