Can you provide some more details on how you are sharing the code:
specifically are your Android projects just referencing a pre-built
assembly containing your shared code? You mention "built against .NET 4.0"
so i'm guessing this is the case?

I'm assuming you have the source code for those shared libraries? Can you
create a new Android Library project and use 'link files' to reference your
shared code, and test your app referencing that library instead of the
pre-built assembly?

This doc covers some of the different ways to include existing C# into an
Android project
http://docs.xamarin.com/ios/tutorials/Cross_Platform/Sharing_Code_Options

Just something to try...


On Fri, Aug 17, 2012 at 6:17 AM, Stephan Steiner
<stephan.stei...@gmail.com>wrote:

> Hi
>
> I guess I'm missing something. I'm developing a mobile version of a client
> that is already available on PCs in multiple forms. Those different clients
> are meant to share as much code as possible in order to cut down on
> repetitive work. So, there's a bunch of libraries that are to be shared
> amongst clients (and they build against standard .NET 4.0)
>
> Here's where it gets tricky:
> I'm creating derived classes from some of the base classes in my libraries,
> and override methods where I need to behave differently for Android. While
> I
> can step through the overridden code just fine, I cannot step into any
> method that is defined in a base class. And to make matters worse, even
> though the base class has proper error handling and should never throw an
> exception in the method I'm calling, I started getting Unhandled Exceptions
> (specifically a System.ServiceModel.EndpointNotFoundException). If I run
> the
> exact same method with the same parameters in a PC based client, not only
> can I step through it, but there are no exceptions (and when I do something
> wrong on the PC client, then the exception is properly caught, and logged).
>
> Do I need a different approach to the whole code sharing issue, and why do
> I
> get unhandled exceptions that are supposed to be handled?
>
> Regards
> Stephan
>
>
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/Stepping-into-standard-NET-libs-tp5711361.html
> Sent from the Mono for Android mailing list archive at Nabble.com.
> _______________________________________________
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

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

Reply via email to