首页 > 代码库 > Could not load file or assembly ‘xxx’ or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
Could not load file or assembly ‘xxx’ or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
在写aspx web application时,我们有时会遇到这个问题。很多情况都是由于在线安装的Package引起的。系统尝试去找某一个version的dll,但是你却更新了最新的Package,造成不兼容。
解决办法就是检查web.config里如下类似的代码,并手动指定version,并安装或加载你想要version的dll即可。
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.11.0.0" newVersion="2.2.0.0" /> </dependentAssembly> </assemblyBinding>
上面这个例子手动指定我想要系统加载Version为2.2.0.0的dll,在Reference里添加时注意也要添加相同版本的dll。
Could not load file or assembly ‘xxx’ or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。