Within a bigger Visual Studio solution (.NET Framework), one test project ignores the path of a third-party assembly reference (file path reference) and, instead, uses a different version of the same third-party assembly, which it finds in a sub-directory of the project. Removing and re-addding the reference does not change anything.
Solution/ project structure looks like this:
- Solution
— External Assemblies
— Third-Party Assembly (v2.0.0)
— Some Project
— Reference to Third-Party Assembly v2.0.0
— Test Project
— Reference to Some Project
— Reference to Third-Party Assembly v1.0.0 (this is the faulty reference)
— Test Files
—- […] + Third-Party Assembly (v1.0.0)
The reference on the unit test project always points to the old version of the third-party DLL.
The third-party DLL has a strong name, if relevant.
The test file package cannot be changed as it is provided by an external customer.
I already added a binding redirect (third-party DLL is backwards compatible), but build fails with error “[…] uses higher version than referenced assembly […]”.
I guess, I am doing something wrong on adding the reference but I cannot figure it out…
Any help or idea is welcome!