I have been working on a Windows Azure project that was started using the Windows Azure 2.0 SDK. After the upgrading to the Windows Azure 2.1 SDK we noticed that the Worker role was no longer work. Since development was being done only on the web role a decision was made to wait to look into why the worker role stopped working.
The project was recently upgraded to Windows Azure 2.2 SDK. It was time to figure out why the worker role stopped working. The problem was with the references were not getting updated and config files were referencing the the wrong version number. The simplest way to ensure that all the references were updated properly is to use Nuget to install and update Windows Azure Storage, Configuration, and Diagnostics.
That made the worker role start working again. While I was testing the system to make sure that web role could still get message to the worker role via the queue it quickly became obvious that something was still wrong.
Time to roll up my sleeves and figure out what was causing the web role to throw an error. The error I was getting is a FileLoadException when I try to get the cloud storage account.
Let’s look at the details for this exception:
Notice that the error states that ‘Microsoft.WindowsAzure.Diagnostics’ version 188.8.131.52 couldn’t be found. This is a problem as we as we are upgrading to version 184.108.40.206.
I proceeded to update the WindowsAzure Diagnostics to 220.127.116.11 using Nuget. But I continue to get the same/similar error message. OK so what didn’t Nuget update for me? By doing a search on all files in my solution for ‘18.104.22.168’ I discovered the that Microsoft.WindowsAzure.Diagnostics was referenced with the wrong version number in the Web Roles web.config file.
In the web role’s web.config file change the version number to 22.214.171.124
<add type=”Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ name=”AzureDiagnostics”>
<filter type=”” />