非强类型程序集 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 (将#修改为@)