So, I recently upgraded my Azure Tools to October 2012, and everything decided to fall apart in my deployment environment. Great. Thanks Microsoft.
I installed the latest tools, fixed the code caused by the breaking changes in the Azure Storage Client Library and then having tested locally - fired off a deployment to Azure.
I then got greeted with a YSOD saying:
Could not load file or assembly msshrtmi or one of its dependencies
Erm, say what now? I don't even have a reference to this anywhere in my project. However, I know that when that is the case, this is normally some low-level GAC'd thing that is causing the problems.
A quick Google reveals that I am far from alone on this issue. I ended up trying out the steps outlined
- Trying out this stackoverflow answer.
- I skipped over this code-based solution as frankly, it seemed way too hacky for me.
- I tried removing all the 'PlatformTarget' references, as mentioned here.
I Found This Fix
I then did this - and it worked!
- Right-click your Azure project (the one with the blue globe).
- Click the "Application" tab.
- Note that there is a button telling you that you have a newer SDK installed?
- CLICK IT!
- .csdef file - 'schemaVersion' is updated.
- .ccproj - 'ProductVersion' and 'CloudExtensionsDir' are updated.
- .csproj - You're Azure SDK references will be updated (ServiceRuntime, Diagnostics etc.)
I think the killer was the 'CloudExtensionsDir' for me, this changed FROM:
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\1.7\</CloudExtensionsDir>
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\1.8\</CloudExtensionsDir>
There you have it - check for the button in the Cloud Project Properties "Application" tab, and make sure your 'CloudExtensionsDir' is pointing to the latest install of your SDKs, which are located:
C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK
I hope this helps!