title: Old DLL file keeps being used
body: <p>I have a seemingly random problem where my project will run using an old version of a DLL file that no longer exists. Sometimes the real version of the DLL file will be used, other times an ancient version of the DLL file will be used. Who knows where Visual Studio is getting this DLL file from - it's months out of date!</p>
  
  <p>I know that it is using the old DLL file, because when the application runs I start getting weird 'TypeLoadExceptions', complaining that methods don't exist or don't have implementations.</p>
  
  <p>The following actions will sometimes help, sometimes not:</p>
  
  <ul>
  <li>Restarting Visual Studio</li>
  <li>Restarting the computer</li>
  <li>Cleaning and rebuilding the solution</li>
  <li>Deleting everything in \WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files</li>
  <li>Searching for and deleting instances of the DLL file in \Documents and Settings\username\Local Settings\Temp</li>
  </ul>
  
  <p>Sometimes I perform <em>all of the above steps</em>, and it still uses an old copy of the DLL file. Where is it hiding it?!</p>
  
  <p>The same issue exists on our <a href="http://en.wikipedia.org/wiki/TeamCity">TeamCity</a> server which is using <a href="http://en.wikipedia.org/wiki/MSBuild">MSBuild</a>. When TeamCity tries to run unit tests it uses an old DLL file.</p>
  
  <p>Now, I know that I can use assembly redirection in the <code>web.config</code> file, but the version number of the DLL file hasn't changed (I don't bother to update it, so it just stays at version 1). I don't want to have to start versioning the DLL files just to solve this problem. I would just like to know which particular caches I need to clear so that I can get on with developing.</p>