0
votes

I am trying to use blob storage on a Xamarin iOS App, I have added the Windows Azure Nuget package and am getting the following error:

.../CSC: Error CS1705: Assembly Microsoft.WindowsAzure.Storage, Version=7.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' depends onSystem.IO.FileSystem.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version number than referenced assembly `System.IO.FileSystem.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' (CS1705)

My System.IO.FileSystem.Primitives package is on version 4.0.1 and I can find no other references in the project to this or the 4.0.0.0 version. Both my WindowsAzure.Storage package and the System.IO.FileSystem.Primitives package are up to date. Can anyone help?

2
Which version of Xamarin are you using? I somewhat recall running into this error, but once I updated to Xamarin 4.1 everything started working. - Michael Curd - MSFT
I am using Xamarin.iOS Version: 9.8.2.22 - Carl
Ok that's the same version I have. Please use the latest Azure Storage library (7.2) as well. I recently created a sample app on Visual Studio that worked with Xamarin 4.1 (which has Xamarin.iOS 9.8) - developer.xamarin.com/releases/vs/xamarin.vs_4/xamarin.vs_4.1/… and Azure Storage Client Library 7.2 - nuget.org/packages/WindowsAzure.Storage - Michael Curd - MSFT
I am using Azure Storage 7.2. I cannot find any reference to the assembly System.IO.FileSystem.Primitives v4.0.0, only 4.0.1.0, which the error states is the correct version. - Carl
The 'DownloadTextAsync' function works on the CloudBlockBlob but all the other Download functions such as 'DownloadToStreamAsync' throw the dependency error. - Carl

2 Answers

1
votes

The version of Azure Storage that works properly with Xamarin is 4.4.0-preview, as mentioned in Azure documentation.

0
votes

You have to use a preview version of Azure Storage with Xamarin. I switched to

v7.1.3-preview

by entering the value manually in the packages.config file and restarted Xamarin Studio, now it all builds fine.