locked
SvcUtil for windows store/phone 8 apps

    Question

  • I'm trying to build a Portable Class library project which UI interfaces built with either .Net 4.5 or Windows Store UI technologies can share.

    This assembly will be built to interface with our WCF services.  However, I'd like for to build the proxy to contain task based endpoints.  There a documented problem with "Add service Reference" for a Portable Class Library project where the "Generate task-based operations" is disabled.

    In a bug filed on the connection site, somebody posted a work around of using add service reference from a Windows Store class and then copy the cs file to the PCL class.  This doesn't work.

    Also, we don't necessarily want all the files created by the Add Service Reference feature and like the tidiness of the class created by SvcUtil.

    However, previous questions asking about a version of svcutil for Windows store apps, they get redirected to just add a service reference.  That does not work.

    The standard version of svcutil implements IExtensibleDataObject which isn't supported in PCL's.

    We want to build our UI service interfaces because we create Models and service classes for a level of separation from our services.  We'd like to do this in PCL's so can reuse the assemblies with different UI technologies.  (We don't want the hassle of creating projects with file links either.)

    So I have two questions, 1) Where can we find a version of svcutil which will create a proxy for windows store apps.  2) (I'm going to assume I'll need to ask this elsewhere.)  How can we prevent svcutil from implementing IExtensibleDataObject when generating a proxy?

    Thanks


    kfrost

    Tuesday, March 04, 2014 3:36 PM

Answers

  • SvcUtil is not available for Windows Store apps.

    You'll need to either generate the proxy yourself or modify the ones generated by SvcUtil to work with Windows Store apps or by Add Service Reference to remove the bits you don't want.

    --Rob

    Tuesday, March 04, 2014 10:18 PM
    Owner