微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

非强类型程序集 Stackexchange Redis 的绑定重定向

如何解决非强类型程序集 Stackexchange Redis 的绑定重定向

我正在开发一个引用第三方 dll 的项目。此 dll 使用旧版本的堆栈交换 redis 包 - 1.2.6.0,它不是强类型的 (PublicKeyToken=null)

在我的项目中,我覆盖了一些 redis 功能,并且我想使用最新版本的 redis

我安装了最新版本的 stackechange.redis (2.2.14) 但是当我构建项目时出现运行时异常

A ReflectionTypeLoadException was thrown when loading the types from the dependency assemblies. The exceptions were:
Could not load file or assembly 'StackExchange.Redis,Version=1.2.6.0,Culture=neutral,PublicKeyToken=null' or one of its dependencies. The located assembly's manifest deFinition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

我尝试添加绑定重定向,但是第三方 dll 中使用的堆栈交换 redis 版本是非强类型的,但较新的版本是强类型的 PublicKeyToken=c219ff1ca8c2ce46。结果,运行时没有选择我的重定向

有什么办法可以让我完成这项工作吗?

谢谢

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。