none
Using Azure Mobile Services in a Portable Class Library?

    Question

  •  I've embarked on a dual W8/WP8 app using the Portable Class Library and also the Azure Mobile Services for the data backend. Pretty quickly I've run aground in that I wanted to use the PCL to house all the shared data logic for the Azure Mobile Services, but I can't reference the "Windows Azure Mobile Services Managed Client" DLL in the PCL. When I've downloaded the W8 and WP8 "TodoList", demo apps from Azure and dissected them, they appear to have different references to "Windows Azure Mobile Services Managed Client", but which ultimately lead to the same .DLL file. However, if I directly add a reference to that DLL, it all gets a bit confused and certainly doesn't work. 

    I realise that the Azure Mobile Services are still in beta so is this ever likely to work? Is there a way I can get this to work?

    Thanks


    Friday, March 01, 2013 11:20 AM

Answers

  • Hi Andy,

    We're actually looking into making the managed client for Azure Mobile Services into a portable library, which seems to be exactly what you want. I don't know exactly when this is coming, but it's definitely in our roadmap. Keep an eye on this forum for updates.

    Thanks for trying out Azure Mobile Services!


    Carlos Figueira

    • Marked as answer by ThatAndyT Tuesday, March 05, 2013 10:40 AM
    Monday, March 04, 2013 7:30 PM
    Moderator

All replies

  • I moved this to an Azure development forum for better visibility.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, March 01, 2013 4:25 PM
  • Hi Andy,

    The Windows Store app and Windows Phone 8 SDKs have different references and point to different DLLs since they are different platforms.

    Take a look at the SDK Manifest for each: C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\ExtensionSDKs\MobileServicesManagedClient\0.2.0.0\

    C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0\ExtensionSDKs\MobileServicesManagedClient\0.2.0.0\

    -Jeff


    Jeff Sanders (MSFT)

    Monday, March 04, 2013 4:36 PM
    Owner
  • Hi Andy,

    We're actually looking into making the managed client for Azure Mobile Services into a portable library, which seems to be exactly what you want. I don't know exactly when this is coming, but it's definitely in our roadmap. Keep an eye on this forum for updates.

    Thanks for trying out Azure Mobile Services!


    Carlos Figueira

    • Marked as answer by ThatAndyT Tuesday, March 05, 2013 10:40 AM
    Monday, March 04, 2013 7:30 PM
    Moderator
  • Ah yes, thanks Jeff. I was of course wrong that they pointed to the same DLL file, I hadn't spotted Microsoft.Azure.Zumo.WindowsPhone8.Managed.dll, I thought they were both pointing towards Microsoft.WindowsAzure.MobileServices.Managed.dll.
    Tuesday, March 05, 2013 10:39 AM
  • Cheers Carlos. I'll keep an eye out for that then and perhaps bear it in mind while building my app so that I can easily refactor it into a PCL when the time comes. Thanks.

    Tuesday, March 05, 2013 10:40 AM
  • +1 on this request. During development I want to have a simple console app that interacts with my service like my actual store app would. Currently that is very difficult since my library that works with Zumo can't be used by a console app. If you have a good workaround, let me know...

    -Ian

    Monday, May 13, 2013 7:33 AM
  • Hi Ian,

    Thank for the +1.  Please go to the User Voice link posted in the forum announcements to provide this feedback. 

    For now... You can simply make the REST calls yourself and leverage the .NET Http classes.  I show how to do this here:

    http://blogs.msdn.com/b/wsdevsol/archive/2013/02/05/how-to-use-httpclient-to-post-json-data.aspx

    -Jeff


    Jeff Sanders (MSFT)

    @jsandersrocks - Windows Store Developer Solutions @WSDevSol
    Getting Started With Windows Azure Mobile Services development? Click here
    Getting Started With Windows Phone or Store app development? Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

    Monday, May 13, 2013 12:04 PM
    Owner
  • Ian,

    We now have a portable library for the Azure Mobile Services SDK - check out the post at http://www.johanlaanstra.nl/?p=217.  Notice that the portable library also included some breaking changes (to align all the platforms, and to address some developer feedback) - you can check them out at http://blogs.msdn.com/b/carlosfigueira/archive/2013/03/14/azure-mobile-services-managed-client-upcoming-breaking-changes.aspx.

    Thanks,
    Carlos.


    Carlos Figueira


    Monday, May 13, 2013 1:57 PM
    Moderator