title: MSBuild error: "Could not resolve this reference. Could not locate the assembly..."
body: <p>I am aware that there is already a question <a href="https://stackoverflow.com/questions/14261412/could-not-resolve-this-reference-could-not-locate-the-assembly">here</a> asking about the exact same error message, but unfortunately the accepted answer doesn't work for me.</p>
  
  <p>I was able to build my current solution successfully earlier this morning, but the build suddenly started failing ~15 minutes ago, with the following error message:</p>
  
  <blockquote>
    <p>C:\Program Files
    (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5):
    warning MSB3245: Could not resolve this reference. Could not locate
    the assembly "MyAssembly.dll". Check to make sure the assembly exists
    on disk. If this reference is required by your code, you may get
    compilation errors.</p>
  </blockquote>
  
  <p>Unfortunately for me, this DLL is required by my code. Because it cannot be located, my solution won't compile.</p>
  
  <p>I have tried cleaning and then building my solution again, but that was useless.</p>
  
  <p>I noticed that there was a yellow icon next to this reference, so I removed the reference and then added it again from the exact same location specified inside the <code>&lt;HintPath&gt;</code> tag in my <code>.csproj</code> file. (The location was the <code>\bin\Debug</code> folder.) The yellow icon then disappeared.</p>
  
  <p>However, <strong>immediately</strong> after I clicked on "Build solution" (in <code>Debug</code> mode), the yellow icon appeared again, and once more I saw the same MSBuild error message, informing me that the DLL could not be located.</p>
  
  <p>How can I resolve this issue?</p>