We\'re having problems getting visual studio to pick up the latest version of a DLL from one of our projects.
We have multiple class library projects (e.g. Business
To avoid the dll hell I would recommend you to create a lib
folder inside your project and put all shared assemblies in this folder. Next you Add References only from this folder. This way your project is self contained and you know exactly where it is picking the references from. If you want to update some assembly with a newer version you copy it to the lib
folder and rebuild your project.
Also make sure you don't the referenced assemblies into the GAC as they might be picked up first.
Check Out this things:
In this case, suppose, you've updated abc.dll from version 1 to version 2 and re-referenced in your web application. but during building process, the version 2 of abc.dll will change back to version 1, because, xyz.dll uses version 1 and web application overwrite abc.dll version 2 back to abc.dll version 1 during auto update on xyz.dll.
Solution: place updated version of abc.dll version 2 in class project bin of xyz.dll , too
Hope, above details will help, good luck
To overcome this, I removed EVERY reference, then added them all back in again. I don't know why this is the solution.
It is possible that in one project a DLL was incorrect, and it is this incorrect DLL that was pulled through by visual studio and used.
Edit: Other times this error has occurred is due to a DDL (A) being referenced in the current project also being referenced by another DLL (B). Not rebuilding this other DLL (B) seems to prevent VS from referencing the correct version of DLL (A) in the current project and thus it brings through an older version of DLL (A).
Have you tried adding the reference as a Project Reference? i.e. Add Reference... -> Projects tab -> Select your project