title: Project References DLL version hell
body: <p>We're having problems getting visual studio to pick up the latest version of a DLL from one of our projects. </p>
  
  <p>We have multiple class library projects (e.g. BusinessLogic, ReportData) and a number of web services, each has a reference to a Connectivity DLL we've written (this ref to the connectivity DLL is the problem).</p>
  
  <p>We always point references to the DLL in the bin/debug folder, (which is where we always build to for any given project) and all custom DLL references have CopyLocal = True and SpecificVersion = False</p>
  
  <p>ReportData has a reference to business logic (which also has a reference to connectivity - I don't see why this should cause a problem, but thought it is worth mentioning)</p>
  
  <p>The weird thing is, when you click "Add Reference" and browse to Connectivity/bin/debug - you hover the mouse over the DLL file, the correct (latest) version is shown (version and file version are always incremented together), but when you click ok, a previous version number is pulled though. Even when I look in the current projects debug folder (where copy local would put the DLL after compiling) that shows the latest version number. - NO WHERE does can I find the previous version of the DLL outside of visual studio, but in that project references it has the old version - even though the path is correct.</p>
  
  <p>I'm at a loss as to where it might be getting the old versions from. Or even why it wants that one.</p>
  
  <p>This is possibly the most frustraighting problem I have ever come across.</p>
  
  <p>Does anyone know how to ensure the latest version is pulled through (preferably automatically or on compile).</p>
  
  <p>EDIT:</p>
  
  <p>Although not exactly the scenario I'm dealing with I was reading <a href="http://msdn.microsoft.com/en-us/library/yx7xezcf%28VS.71%29.aspx" rel="noreferrer">this</a> article and somewhere it mentions about CLR ignoring revision numbers. Understandable (even though this hasn't been a problem before - we're on revision 39), so I thought I would update the build number, still didn't work. In a vain attempt I though I would update the minor version number and see if that made any difference.</p>
  
  <p>I'm not saying this is the answer as I have to check quite a few things first, but on the face of it, this seems to have solved my problem...</p>
  
  <p>Further edit:
  In other class libraries this seems to have solved the problem, however in a test windows application it still pulls a previous version through :(</p>
  
  <p>If I increment the minor version number again, the same problem come back and I am left with the wrong version being pulled though.</p>
  
  <p>Further Edit - I created an entirly new project, added a reference and still had the exact same problem. This suggests the problem is restriced to the project I am referencing. Wish I knew why!</p>
  
  <p>Anyone had this problem before and know how to get around it?</p>
  
  <p>HELP!</p>