<p>We have several common libs. Ideally we want them all to use the latest version of a dll even if they have been compiled against an older different version (assume the latest version is backward compatible)</p>

<p>e.g we have:<BR>
<BR>
Project dll<BR>
Common controls dll<BR>
Logging dll<BR>
Database access dll</p>

<p>Project and common controls reference v2 of database dll. Logging however references v1. </p>

<p>If different versions are referenced in different components how does VS pick which one to use? <BR>
Do we have to recompile v1 dll to use the latest database (v2) or can we get this to pick up automatically?<BR>
Is it possible to force a particular version to be used?</p>

<p>Thanks,</p>

<p>Alex</p>

By default, for versioned DLLs I believe VS will force an exact match. If you look in the properties of the reference, however, you'll find a property called "Specific Version". Set that to "false" and it will match later versions.
I don't have the full version of VS with me to find an appropriate MSDN link, unfortunately.
In addition, you can use the
assemblyBinding
element in app.config.