title: "Could not load file or assembly 'XXX.YYY' or one of its dependencies. The system cannot find the file specified."
body: <p>I have a .net visual studio solution with a number of projects (class libraries and a web application).</p>
  
  <p>I did some refractoring which moved files between projects, created new projects, deleted ones not being used and renamed some existing projects.</p>
  
  <p>The solution builds without an issue but when I run the web application, the following exception occurs:</p>
  
  <p>"Could not load file or assembly 'XXX.YYY' or one of its dependencies. The system cannot find the file specified."</p>
  
  <p>The project called XXX.YYY which was deleted in the refractoring outputed a dll called XXX.YYY. But this isnt used anywhere in the application. I deleted the web applications obj directory and bin folder and rebuild but it still occurs.</p>
  
  <p>Anyone have any ideas when this might be occurring, any tips??</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Update on my issue. I took the code place to another computer and ran it from there and it built and ran successfully without this issue occurring. So this makes me think the issue is with my PC rather than the code base. Maybe there is something cached on my PC. I did delete my temp files at "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" but no luck.</p>
  
  <p>So anything else that could be cached or any other reason for it to occur on my PC.</p>
  
  <p><strong>FURTHER UPDATE</strong></p>
  
  <p>Another update on this. I have ran the same code on other developers machine and he doesnt have an issue running it. So must definitely be something on my machine! The only different on our machine is that I am running IIS7 with the app's app pool in classic mode. The other developer is running IIS6.</p>
  
  <p>2 new pieces on information. Firstly in my httpmodules in my web.config, I have to remove a custom http module, before adding it. The other developer does not have to do this. Secondly, I have been able to fix the "Could not load file or assembly 'XXX.YYY' or one of its dependencies" issue via a "hack" which is only a short term fix by creating a class library in my project called XXX.YYY and including the classes being looked for, which are all custom controls ie. inheriting from System.Web.UI.WebControls.WebControl. </p>
  
  <p>Any further thoughts....</p>