5
votes

Hi I'm really new on Azure. I've VS 2012 and Azure SDK 2.1, when I run my web application with the emulator all work fine. But when I deploy on azure I have the error message :

Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Is the Windows Azure platform using an older version? how can I solve this problem, please.

1
Can you share any code and where its located in your application? Its also important to note that not all the components of the Windows Azure SDK's are pre-baked into the PaaS Cloud Service VM instances (service bus is a notable exception although that doesn't appear to apply to your situation). So I generally make sure that "copylocal=true" in my builds is set for any important assemblies.BrentDaCodeMonkey
"note that not all the components of the Windows Azure SDK's are pre-baked into the PaaS Cloud Service VM instances" but Microsoft.WindowsAzure.ServiceRuntime is an essential element !!! Please see my answer belowDadyFuji

1 Answers

1
votes

I would venture to say that there are two possibilities (in order of likely-hood):

1) CopyLocal=True for the ServiceRuntime and it should be false. ServiceRuntime is already deployed on the Azure machines. You don't want to deploy your own.

2) Somehow your Cloud service config is configured to use an older version of Azure which is forcing the deployed VM to use SDK 2.0 or lower while your code is expecting v2.1. Make sure that osFamily, osVersion, and schemaVersion all are up to sniff with respect to being on 2.1 (I believe schemaVersion is what defines the proper Azure SDK version)