Recently I tried to deploy an application that was originally designed for the cloud on an in-house server. The only cloud capability the application used was the Windows Azure Blob Storage.
So in advance I changed the application to differ between
- being run in the cloud and using the Blob Storage and
- being run on premise and using the local disk storage
by using the following flag as an indicator:
In both scenarios the deployment contains the Microsoft.WindowsAzure.StorageClient.dll. This works perfectly in the cloud but raised the following error on premise:
Exception type: FileNotFoundException
Exception message: File or assembly "msshrtmi, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31bf3856ad364e35", or one of its dependencies, was not found.
There are two possible ways to solve this issue:
- Copy the msshrtmi.dll manually to your on premise deployment.
For example in the \bin folder next to the WindowsAzure.StorageClient.dll.
- Install the Windows Azure SDK on your in-house server.