Azure Deployment Issue: Unhandled Exception: Could not load file or assembly 'Microsoft.Azure.DocumentDB.Core

0

I was having performance issues with table storage and upgraded to the latest library/sdk. Everything works fine locally and I can run on the emulator. However, when I try to deploy to my Azure Cloud Service I get the following error:

Details: Recovering role... Unhandled Exception: Could not load file or assembly 'Microsoft.Azure.DocumentDB.Core, Version=2.11.2.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)

The web role just recycles constantly with this error. The actual dll version is 2.11.6.0. Things I have tried:

  1. I have logged on to the web role and checked the dll is the expected one (2.11.6.0).
  2. bindingRedirects: all relevant projects have a binding redirect of this form:
<dependentAssembly>
    <assemblyIdentity name="Microsoft.Azure.DocumentDB.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-2.11.6.0" newVersion="2.11.6.0" />
  </dependentAssembly>
  1. I have done a text search through all files in my project for Microsoft.Azure.DocumentDB.Core - every reference (that mentions version) references 2.11.6.0. This includes files of this form dll.config file - which I did not manually edit but which do have the correct redirect.
  2. I tried changing the Azure role osFamily to 6 (it had been 5)
  3. I tried deleting the packages folder and regenerating
  4. I tried deleting all redirect statements and allowing Visual Studio to automatically generate them for me.

The publish is done via 'publish' in Visual Studio 2019 on the Cloud Service (csdef).

Could anyone suggest what else I can try to deploy this cloud service?

azure
deployment
cloud
assemblies
asked on Stack Overflow Sep 8, 2020 by Rob Wavre

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0