none
Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.0.0

    Question

  • I'm building a new C# class library project which needs to interact with Queues and Tables (not blobs) currently.

    I've installed via NuGet the latest Storage Client Library (3.0.3.0) but none of the API calls are working either against the Storage Emulator or against a real Azure Storage Account.  The exception I get is

    Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.0.0

    which is coming from

           at Microsoft.WindowsAzure.Storage.Table.Protocol.TableUtilities.TranslateDataServiceException(Exception e, RequestResult reqResult, Func`3 parseError)
           at Microsoft.WindowsAzure.Storage.StorageException.CoreTranslate(Exception ex, RequestResult reqResult, Func`2& parseError)
           at Microsoft.WindowsAzure.Storage.StorageException.TranslateException(Exception ex, RequestResult reqResult, Func`2 parseError)

    My packages.config file is shown below

    <

    packages>

      <

    packageid="EntityFramework"version="6.0.2"targetFramework="net45"/>

      <

    packageid="log4net"version="2.0.3"targetFramework="net45"/>

      <

    packageid="Microsoft.Data.Edm"version="5.6.1"targetFramework="net45"/>

      <

    packageid="Microsoft.Data.OData"version="5.6.1"targetFramework="net45"/>

      <

    packageid="Microsoft.Data.Services.Client"version="5.6.1"targetFramework="net45"/>

      <

    packageid="Microsoft.WindowsAzure.ConfigurationManager"version="1.8.0.0"targetFramework="net45"/>

      <

    packageid="Newtonsoft.Json"version="5.0.8"targetFramework="net45"/>

      <

    packageid="NUnit"version="2.6.3"targetFramework="net45"/>

      <

    packageid="NUnitTestAdapter.WithFramework"version="1.0"targetFramework="net45"/>

      <

    packageid="System.Spatial"version="5.6.1"targetFramework="net45"/>

      <

    packageid="Unity"version="3.0.1304.1"targetFramework="net45"/>

      <

    packageid="WindowsAzure.Storage"version="3.0.3.0"targetFramework="net45"/>

    </

    packages>

    I've literally tried everything to get this to work including rolling back packages etc but I can't find any combination of WindowsAzure.Storage and Microsoft.Data.Services.Client which works.

    I've also installed the recently released 2.2.1 Storage Emulator Preview but that still didn't work but anyway, the code doesn't work against a real Azure Storage Account either.

    The methods I'm using are simply things like table.CreateIfNotExists and DeleteIfExists having obtained a table reference.

    I'd really appreciate some guidance as I'm out of ideas and I thought this stuff would just work.


    TonyW

    Saturday, March 15, 2014 5:08 AM

Answers

  • Thanks Gaurav

    I had actually already seen your SO answer and read everything it linked to and tried everything it suggested; learnt a lot along the way as well so thanks for that.

    I did finally solve my problem and I'm still slightly surprised and embarrassed by the solution.

    Basically, I had an uppercase letter in both my Queue name and my Table name.

    Once I began using all lowercase letters, everything started working fine!  I know these naming guidelines are documented but what a ridiculous error message to throw from the Storage Client Library.  Having read the above articles on the Storage Team Blog, I now understand why I get that error message but even so I think they could do a better job of reporting the real issue.

    I still find however that methods like DeleteIfExists and even Exists still throw exceptions if the Queue or Table isn't there which is bizarre.  I'm now just catching those exceptions but that doesn't seem right to me.

    Thanks so much for coming back to me and trying to help.  I really appreciate it.


    TonyW

    Monday, March 17, 2014 7:40 AM

All replies

  • Monday, March 17, 2014 4:47 AM
  • Thanks Gaurav

    I had actually already seen your SO answer and read everything it linked to and tried everything it suggested; learnt a lot along the way as well so thanks for that.

    I did finally solve my problem and I'm still slightly surprised and embarrassed by the solution.

    Basically, I had an uppercase letter in both my Queue name and my Table name.

    Once I began using all lowercase letters, everything started working fine!  I know these naming guidelines are documented but what a ridiculous error message to throw from the Storage Client Library.  Having read the above articles on the Storage Team Blog, I now understand why I get that error message but even so I think they could do a better job of reporting the real issue.

    I still find however that methods like DeleteIfExists and even Exists still throw exceptions if the Queue or Table isn't there which is bizarre.  I'm now just catching those exceptions but that doesn't seem right to me.

    Thanks so much for coming back to me and trying to help.  I really appreciate it.


    TonyW

    Monday, March 17, 2014 7:40 AM