我们正在使用Azure SDK 1.8,它在本地工作正常.我们正在使用TFS托管的构建控制器来部署在天蓝色上.
它工作正常,但突然之间,我们得到这个错误,虽然我们没有azure sdk dll版本更改,但在线我们得到这个错误.这是因为TFS构建控制器使用新的sdk升级?奇怪的是,这个构建每次都显示成功.
在TFS构建服务中,我发现这个奇怪的东西,为什么它引用到v2.0 sdk.
Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime,Version=2.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest deFinition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
如果一切都失败,并且正确的DLL部署在bin中,请尝试在web.config中添加装配绑定重定向:
<dependentAssembly> <assemblyIdentity name="Microsoft.WindowsAzure.ServiceRuntime" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="2.0.0.0" newVersion="1.8.0.0" /> </dependentAssembly>
根据需要更改绑定版本号.