Could not load file or assembly msshrtmi or one of its dependencies

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

All to no avail..

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?
So, it turns out that some minor changes get made to a few files that make all the difference:
  • .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!


Popular posts from this blog

TDD – Getting Started with Test-Driven Development

Visual Studio: Unknown Build Error (HRESULT 0x80131515)

GTD: Speak Your Mind, Your Tasks Will Follow