Upgrade to Azure SDK v1.3 is not as smooth as expected
Recently I have upgraded my Azure environment to the newer SDK (v1.3, November Release). I would like to share my experience as I hit problems and spent a little time resolving them.
Before the upgrade
My environment was:
1) VS 2010 Premium edition
2) Windows Azure SDK July Release
Upgrade
I have downloaded and installed Azure SDK v1.3.
Problem #1
My existing application which used Azure Storage stopped working.
After I launched a previously working WebApp (which used Azure Storage) I got following exception:
Could not load file or assembly 'Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I poked around, however it was not obvious what caused this error as my project referred to the newly added Storageclient.dll with version 1.1.0.0. Even though the Version of StorageClient was promoted to 1.1.0.0. the Product Version of the dll was not upgraded and remained same as the version of StorageClient.dll 1.0.0.0.
The problem went away only after I replaced ALL references to StorageClient in ALL projects of the solution.
Problem #2
After fixing the StorageClient issue I faced the Configuration Setter problem as my app produced following exception:
SetConfigurationSettingPublisher needs to be called before FromConfigurationSetting can be used
The problem was caused by the website executing in another process (worker thread). Therefore the setter had to be assigned in the Application_Start event of Global.asax.cs
More information could be red in
Conclusion
My take away from this experience includes following points:
1) Windows Azure is being constantly developed and modernized, new concepts come up
2) It is good to allocate some time for unforseen difficulties when upgrading to a new API, SDK, etc.
3) Back-up your solution :)
| Tweet |