[mono-android] Consuming WCF 4.0 Service
Jonathan Pryor
jonp at xamarin.com
Fri Oct 26 14:44:12 UTC 2012
On Oct 24, 2012, at 10:32 AM, robroysd <arjun.chandar at gmail.com> wrote:
> I have a WCF service, embedded in an asp.net MVC3 app. I want to consume this service thorugh my android app (mono for android).
>
> When i reference the service (through a shared library) i get the following error: Error 1 The type 'System.Runtime.Serialization.IExtensibleDataObject'
> is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
You need to do two things:
1. Add an assembly reference to System.Runtime.Serialization.dll. (The Mono for Android profile includes a System.Runtime.Serialization.dll.)
2. Your shared library needs to be rebuilt to use the Mono for Android profile assemblies. You can do this by creating a new project and using file linking:
http://docs.xamarin.com/ios/Guides/Application_Fundamentals/Building_Cross_Platform_Applications/Part_3_-_Setting_Up_A_Xamarin_Cross_Platform_Solution#File-linking_into_each_App_Project
- Jon
More information about the Monodroid
mailing list