Binding redirect for non strongly typed assembly Stackexchange Redis


Im working on a project that references a third party dll. This dll uses an older version of stack exchange redis package - which is not strongly typed (PublicKeyToken=null)

In my project I overwrite some of the redis functionality and I want to use latest version of redis.

I installed latest version of stackechange.redis (2.2.14) however when I build the project Im getting a runtime exception

A ReflectionTypeLoadException was thrown when loading the types from the dependency assemblies. The exceptions were:
Could not load file or assembly 'StackExchange.Redis, Version=, 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)

I tried adding a binding redirect, however the stack exchange redis version that is used in the third party dll is non strongly typed, but the newer version is strongly typed PublicKeyToken=c219ff1ca8c2ce46. As a result the runtime doesn’t pick up my redirect.

Is there any way I can make this work?


asked on Stack Overflow Apr 28, 2021 by stas.ivash

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0