小编her*_*dev的帖子

BindingRedirect 在云服务中不被认可

我在初始化云服务时收到异常:

System.IO.FileLoadException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

了解我已经4.3.0.0安装了版本,我app.config为我的工作人员添加了以下重定向:

<dependentAssembly>
  <assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" />
  <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
</dependentAssembly>
Run Code Online (Sandbox Code Playgroud)

当在本地模拟器中本地运行时,这可以解决问题。当这是通过打包cspackapp.configworker.dll.config包含在package.xml,两人都包括绑定重定向。还包括“Microsoft.WindowsAzure.Storage”,包括.dll.xml.

因此,在我看来,运行时所需的一切都已提供。

不幸的是,异常告诉我尚未应用重定向,它仍在寻找 version 2.1.0.0。我在这里做错了吗?

azure azure-cloud-services

6
推荐指数
1
解决办法
483
查看次数

标签 统计

azure ×1

azure-cloud-services ×1