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)
e.g we have:
Project dll
Common controls dll
Logging dll
Database access dll
Project and common controls reference v2 of database dll. Logging however references v1.
If different versions are referenced in different components how does VS pick which one to use?
Do we have to recompile v1 dll to use the latest database (v2) or can we get this to pick up automatically?
Is it possible to force a particular version to be used?
Thanks,
Alex
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.