BindingRedirect not being honored
I'm receiving an exception when initializing a cloud service:

System.IO.FileLoadException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Understanding that I have version '4.3.0.0' installed, I have added the following redirect into the 'app.config' for my worker:

      <dependentAssembly>
        <assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
      </dependentAssembly>
 
When run locally within the local emulator this resolves the issue. When this is packaged through cspack the 'app.config' and 'worker.dll.config' are included in the package.xml, both have the binding redirect included.
The 'Microsoft.WindowsAzure.Storage' is also included, both the .dll and .xml.

So as far as I see it, everything that is required during runtime has been supplied.

Unfortunately, the exception is telling me that the redirect has not been applied and it is still looking for version 2.1.0.0. Am I doing something wrong here?
April 29th, 2015 5:54am

Hi,

I suggest you to try the suggestions that are mentioned in the below Stackoverflow thread which is similar to the current scenario

http://stackoverflow.com/questions/18695991/missing-microsoft-windowsazure-diagnostics-assembly

Hope this helps !

Regards,

Sowmya

Free Windows Admin Tool Kit Click here and download it now
April 29th, 2015 8:52am

Unfortunately those are very simple examples,

I am using many different packages in this solution that are referencing the same product (e.g. Newtonsoft.Json) but with different versions. If I owned the packages I could of course update the versions to be consistent with each other, but I don't and therefore can't change it.

Most of the conflicts are actually from azure packages, and with bindingredirects this isn't an issue locally. It's just when deployed that this isn't working.

April 29th, 2015 9:41am

Hi,

I suggest you to try using the below in "app.config"and check if it helps 

<bindingRedirect oldVersion="2.1.0.0" newVersion="4.3.0.0" />

Hope this helps !

Regards,

Sowmya




Free Windows Admin Tool Kit Click here and download it now
April 30th, 2015 4:58am

Hi,

I suggest you to try using the below in "app.config"and check if it helps 

<bindingRedirect oldVersion="2.1.0.0" newVersion="4.3.0.0" />

Hope this helps !

Regards,

Sowmya




April 30th, 2015 8:57am

Hi,

I suggest you to try using the below in "app.config"and check if it helps 

<bindingRedirect oldVersion="2.1.0.0" newVersion="4.3.0.0" />

Hope this helps !

Regards,

Sowmya




Free Windows Admin Tool Kit Click here and download it now
April 30th, 2015 8:57am

Hi,

I suggest you to try using the below in "app.config"and check if it helps 

<bindingRedirect oldVersion="2.1.0.0" newVersion="4.3.0.0" />

Hope this helps !

Regards,

Sowmya




April 30th, 2015 8:57am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics