Forum Libraries, Components, and Plugins

Why can't Azure Storage & MobileServices work together?

I'm currently in dependency hell, all I'm trying to do is leverage Azure.Storage & MobileServices from my PCL. I've been trying for five days now and there seems to be no end to the inane dependency issues these two frameworks bring, even though they're for the same service made by the same author.
I've attached the most recent debug log if anyone cares for a look.

My suspicion is that Azure.Storage uses old versions of the System namespace. I get this from the AsmSpy output. What I don't comprehend is why there's no capability to load different versions of the "same assembly" when NuGet packages are so inanely explicit about it.

I'm going to keep updating this post to keep my sanity and incase I'll solve it other might benefit.

Made a clean project and it seems Newtonsofts.Json framework is a LARGE offender, the latest version 7.0.1 apparently explicitly uses the 2.0.5.0 version of System.Runtime.Serialization and pretty much everything else.
Reference: System.Runtime.Serialization
2.0.5.0 by Newtonsoft.Json
Now excuse me I'll see if I'm able to change these dependencies or somehow make the version number implicit.
Note: Even though there's assembly conflicts the app continues to work. That's until I add MobileServices though.

I've been on stackoverflow without any woking solutinos a dozen of times now for these issues;
Failed to add reference to 'System.Data'. Please make sure that it is in the Global Assembly Cache.
could not resolve conflict between system.runtime.serialization
could not load microsoft.data.edm

I also get this warning in the Error List:
Severity Code Description Project File Line
Warning Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: Gem.Droid

Answers

  • MagnusBraathen.5978MagnusBraathen.5978 NOMember
    edited November 2015

    It looks like this Xamarin code needs to be changed somehow. This would be a good time for a Xamarin Employee to help out a little @MarkSimpson ?
    <Target Name="_ResolveSatellitePaths" DependsOnTargets="_ResolveAssemblies" > <ResolveAssemblyReference AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)" AssemblyFiles="@(ResolvedUserAssemblies)" FindDependencies="True" FindRelatedFiles="False" FindSatellites="True" SearchPaths="$(AssemblySearchPaths)" TargetFrameworkMoniker="$(TargetFrameworkMoniker)" TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)" TargetFrameworkDirectories="$(TargetFrameworkDirectory)"> <Output TaskParameter="SatelliteFiles" ItemName="_AndroidResolvedSatellitePaths"/> </ResolveAssemblyReference> </Target>

  • AllisterAllister USMember ✭✭

    Not sure if you've resolved your issue.
    We're using WindowsAzure.Storage and Microsoft.Azure.Mobile.Client (which I think was formerly called something along the lines of windowsazure.mobileservices, prior to version 2 release) in a Xamarin.Forms PCL solution.
    After installing the nugets I had to add a few missing references but got it all working in the end.
    The Storage part not isn't currently PCL compliant (if you're in Release mode, it worked in Debug weirdly) if you're using 6.2.0; because the XamarinPCL part is still in preview; so have to be using the 6.2.2-preview version apparently (saw that on another forum post by one of the xamarin folk).

  • Hi @Allister thanks for the reply, I eventually got it working with the new release of the Client library which finally isolated all the client functionality into a single package. I did also move the server project to it's own solution. At the time of writing I can't remember to have used any prereleases. I found this guide though which says to use prerelease. It might just be my memory. :smile:

  • JeremyBPJeremyBP FRMember ✭✭

    Hi, I recently pushed a plugin to Nuget, trying to simplify Azure Mobile Apps and Storage implementation and usage.
    Maybe you could find it useful: Nuget / GitHub / Tutos

    There's an extension package dedicated to file sync.
    Feel free to give me some feedback.

Sign In or Register to comment.