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

  • Question

  • I spun up an empty WPF application, installed the NuGet package "Install-Package windowsazure.mediaservices".  It states that there is a dependency (among several others) on Microsoft.Data.Services.Client v5.6.0.0.  The package manager adds all of the dependencies and everything compiles.

    When I attempt to create a CloudMediaContext using my account name/key:

        _cloudMediaContext = new CloudMediaContext(AzureMediaServicesAccountName, AzureMediaServicesAccountKey);
    catch (Exception ex)
        if (Debugger.IsAttached)

    I get the following exception:

    {"Could not load file or assembly 'Microsoft.Data.Services.Client, Version=, 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)":"Microsoft.Data.Services.Client, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"}

    Is anyone else running into this problem?  I've tried to use the latest nuget package on 2 different machines/projects and still cannot create a CloudMediaContext.  

    Monday, February 3, 2014 6:42 PM


  • You must enable AutoGenerateBindingRedirects.

    See here

    • Proposed as answer by Adarsh Solanki Monday, February 3, 2014 7:26 PM
    • Unproposed as answer by acme_hap Tuesday, February 4, 2014 3:38 PM
    • Marked as answer by acme_hap Tuesday, February 4, 2014 4:20 PM
    Monday, February 3, 2014 7:26 PM