After upgrading our project to use the Azure SDK 2.5, I get the following runtime exception when deployed to Azure (web role):
Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
One of the referenced packages from NuGet is still referencing ServiceRuntime 2.4.0.0
. From what I understand, all I need to do to fix this is create a bindingRedirect
in our web.config
:
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.ServiceRuntime" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.5.0.0" newVersion="2.5.0.0"/>
</dependentAssembly>
Unfortunately this doesn't work. The exception persists. Can anyone provide guidance?