0

I have a webjob running in my azure environment. I am invoking a method on a class in a separate dll. But getting the following eror:

Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

Do i need azure sdk installed on the separate project as well?

Can anyone clarify on this please?

Thanks

Mukil Deepthi
  • 6,072
  • 13
  • 71
  • 156

1 Answers1

3

This problem may occur when you are using a library that references an old version of a dll and that a new one is deployed with your webjob.

You can add a binding redirect in the app.config, as described on this page : https://msdn.microsoft.com/en-us/library/7wd6ex19(v=vs.110).aspx

Check the version of Microsoft.WindowsAzure.ServiceRuntime you are referencing in your project and just add a line in your app.config :

<dependentAssembly>
    <assemblyIdentity name="Microsoft.WindowsAzure.ServiceRuntime"
      publicKeyToken="31bf3856ad364e35"
      culture="en-us" />
    <bindingRedirect oldVersion="2.4.0.0" newVersion="YOUR_VERSION" />
  </dependentAssembly>

Hope this helps,

Julien

Julien Corioland
  • 1,115
  • 6
  • 9