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?
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,
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.
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
- Proposed as answer by Sowmya K RMicrosoft contingent staff, Moderator 19 hours 25 minutes ago
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
- Proposed as answer by Sowmya K RMicrosoft contingent staff, Moderator Thursday, April 30, 2015 11:52 AM
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
- Proposed as answer by Sowmya K RMicrosoft contingent staff, Moderator Thursday, April 30, 2015 11:52 AM
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
- Proposed as answer by Sowmya K RMicrosoft contingent staff, Moderator Thursday, April 30, 2015 11:52 AM
- Marked as answer by Nithin.RathnakarMicrosoft contingent staff, Moderator 2 hours 33 minutes ago