CIn our .NET application we have project A that reference an infrastructural project, let's call it Infra. Now, project A also references project B, which resides in a different solution, referencing another version of the Infra. The top level application, project C, references project A.
While this compiles just fine, it has another side effect - it does not copy the Infra.dll to the bin folder of project C.
I increased the verbosity of the build output, to see what exactly is the problem, and saw this:
There was a conflict between "Infra, Version=1.1.14.9..." and "Infra, Version=1.0.0.0 ...". "Infra, Version=1.1.14.9" was chosen because it had a higher version.
That actually makes a lot of sense, having 2 conflicting references to the same version should try to get the higher version. The problem is that B project's reference to Infra is not an accessible path and therefore will not be copied.
I could surly solve this issue by adding a reference form project C directly to infra, but I would prefer not to. I was wondering whether I could tell the compiler explicitly which version to use.
Any ideas?