title: What causes MS Visual Studio to be unable to recognize build errors?
body: <p>In <code>Visual Studio Express 2010</code>, I can usually only build a program once and then to make any changes I have to paste my code into a new project. It will say that the build was successful, but then I try to run it and get an error message saying, </p>
  
  <blockquote>
    <p>"This project is out of date-- would you like to build it?"</p>
  </blockquote>
  
  <p>and I click yes and I get another error message saying that there were build errors and I have to continue from the last successful build. <em>Sometimes</em> instead of running the last successful build I get an error message saying, </p>
  
  <blockquote>
    <p>"Unable to open [directory to program]. The system cannot find the
    file specified."</p>
  </blockquote>
  
  <p>I usually use <code>Visual Express 2012</code> for this reason but even then it happens every now and then, seemingly at random. Once the issue begins there is no apparent way to fix it (rebuilding and restarting Visual Studio both have the same result). In <code>Visual Studio Pro 2012</code> this also seems to happen.</p>
  
  <p>EDIT: This is in the output box of the one in front of me (2010 edition)</p>
  
  <pre><code>1&gt;------ Build started: Project: Lab01, Configuration: Debug Win32 ------
  1&gt;  Lab01.cpp
  1&gt;c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\system.core.dll : warning C4945: 'ExtensionAttribute' : cannot import symbol from 'c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\system.core.dll': as 'System::Runtime::CompilerServices::ExtensionAttribute' has already been imported from another assembly 'mscorlib'
  1&gt;          c:\windows\microsoft.net\framework\v4.0.30319\mscorlib.dll : see declaration of 'System::Runtime::CompilerServices::ExtensionAttribute'
  1&gt;          first seen type is used; re-order imported assemblies to use the current type
  1&gt;          This diagnostic occurred while importing type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
  1&gt;Lab01.cpp(28): error C2664: 'std::basic_istream&lt;_Elem,_Traits&gt; &amp;std::basic_istream&lt;_Elem,_Traits&gt;::get(_Elem &amp;)' : cannot convert parameter 1 from 'char [101]' to 'char &amp;'
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;
  1&gt;          ]
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>I guess it says the error in there but it tells me "build succeeded" for some reason...</p>