I try to publish a demo application to Windows Azure using Cloud Service and Azure SDK 2.9. In my service I have a Web Role and a Worker Role. Both use Azure Storage. Everything works fine on local hosting (Emulator) but when I try to publish the app I get the following error on Web Role:
Unhandled Exception: System.Runtime.Serialization.SerializationException,
Details: Exception: Unable to find assembly 'Microsoft.WindowsAzure.Storage, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf385)
In the Worker Role project everything is OK, it's using Storage too.
I tried to convert the Web Role to a standard Web Application and everything works fine but I want to resolve this problem on Cloud Application.
What I've tried:
- set local copy in references to true
- changed .Net Framework to 4.5.1 and 4.6 (default 4.5)
- removed and added reference to Storage again
- reinstalled all libraries by nuget
- published with Storage 7.0 and 6.2
- published by VS and by portal (package)
- added dependentAssembly to web.config
On my VM I checked the bin folder, Microsoft.WindowsAzure.Storage exists.
Any ideas what is wrong?