我有一个 MVC 4 应用程序在本地运行良好,但在部署到 Azure 时失败并显示此消息:
[FileNotFoundException: Could not load file or assembly Microsoft.WindowsAzure.ServiceRuntime, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor.GetDefaultStartupInfoForCurrentRoleInstance() +0
Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener..ctor() +40
我确定我引用了 Microsoft.WindowsAzure.ServiceRuntime 1.8 版并将其设置为复制本地。