作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
升级我们的项目以使用 Azure SDK 2.5 后,在部署到 Azure(Web 角色)时出现以下运行时异常:
Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
NuGet 引用的包之一仍然引用 ServiceRuntime 2.4.0.0
。据我了解,解决此问题所需要做的就是在我们的 web.config
中创建一个 bindingRedirect
:
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.ServiceRuntime" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.5.0.0" newVersion="2.5.0.0"/>
</dependentAssembly>
不幸的是,这不起作用。异常仍然存在。谁能指导一下吗?
最佳答案
我自己升级到 SDK 2.5 后,遇到了与您现在相同的问题。我检查了解决方案中的所有项目,并检查了对 Microsoft.WindowsAzure.ServiceRuntime 的所有引用。删除它们,然后使用添加引用选项再次添加它们。再次选择该程序集,但请确保它是 2.5.0.0 版本。重建并重新部署。现在一切应该恢复正常了。
关于azure - 无法加载文件或程序集 ServiceRuntime 2.4.0.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29115731/
我是一名优秀的程序员,十分优秀!