Using OData (5.5.0) NuGet Package in Windows Azure Cloud Services That reference the Windows Azure Storage NuGet Package

June 25, 2013 — 2 Comments

images

A few months back I wrote a post entitled “The ODataLib Dependency Issues in the Storage Client Library for .NET are Now Resolved”. In this post I was stating the fact that the dependency issues has been resolved.

Today I decided to experiment with this, because by fear of more problems, I’ve been restraining myself from upgrading to the latest ODataLib NuGet packages.

The Windows Azure Storage NuGet package doesn’t have a good history of playing nice with the latest ODataLib NuGet package and this caused quite a few problems for my projects in the past.

So, I checked in all my code and gave it a go!
To my greatest surprise, nothing blew up!

Thanks to this new  Windows Azure Storage NuGet package I can finally work with all the latest NuGet packages used by my solution.

With this short post, I wanted to thank the Windows Azure team for fixing this bug. You guys made my day!


Note:

Not configuring the binding redirect as follows for your Web and Worker Roles:
<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-5.5.0.0" newVersion="5.5.0.0" />
    </dependentAssembly>
  </assemblyBinding>
</runtime>
Will result in the following error:

Could not load file or assembly ‘Microsoft.Data.OData, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I wish this would work without the binding redirect …

2 responses to Using OData (5.5.0) NuGet Package in Windows Azure Cloud Services That reference the Windows Azure Storage NuGet Package

  1. 

    Thank you for the post, it really help me.

    Like

Trackbacks and Pingbacks:

  1. Dew Drop – June 26, 2013 (#1,573) | Alvin Ashcraft's Morning Dew - June 26, 2013

    […] Using OData (5.5.0) NuGet Package in Windows Azure Cloud Services That reference the Windows Azure S… (Alexandre Brisebois) […]

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s