Consuming WCF 4.0 Service

truckwintruckwin USMember
edited October 2012 in Xamarin.Android

Hi,

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'.

I realize that the .net Profile for mono for android is different than .net 4.0, but for the above situation, is there a work around?

any help is appreciated. Thanks.

Posts

  • AtsushiEnomotoAtsushiEnomoto Xamurai JPMember, Xamarin Team Xamurai

    Hello,

    You cannot use WCF proxies that is built with .NET 4.0 profile. WCF in Mono for Android is based on almost the same API profile as what Silverlight had, which references "2.1" profile of WCF assemblies.
    To generate 2.1-compatible WCF proxies, you need to use Silverlight SDK's SlSvcUtil.exe or mono's svcutil with --moonlight or --monotouch option.

Sign In or Register to comment.