title: Can not build web applications in Visual Studio 2010 when targeting frameword 2.0 or 3.5
body: <p>VS2010 ultimate with Asp.net MVC 3.0 installed.
  "New" --> "Project", choose ".Net framework 2.0" or "3.5", then choose "Asp.Net web application",
  starting a new 2.0 or 3.5 asp.net web application.</p>
  
  <p>Then build the project, or directly debug it by F5, producing the build error as follows:</p>
  
  <blockquote>
    <p>------ Build started: Project: TestAspNet35, Configuration: Debug Any CPU ------
    fatal error CS0008: Unexpected error reading metadata from file 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll' -- 'Index not found.'</p>
    
    <p>Compile complete -- 1 errors, 0 warnings</p>
    
    <p>========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========</p>
  </blockquote>
  
  <p>But it will be just fine using the 4.0 framework.</p>
  
  <p>The OS is Window 7 ultimate.</p>
  
  <p>How can I solve the problem?</p>
  
  <p><strong>[UPDATE]</strong></p>
  
  <p>Problem solved by copy a System.Web.dll file to folder c:\Windows\Microsoft.NET\Framework\v2.0.50727\ and overwrite the old one.</p>
  
  <p>It seems to be something wrong with the old System.Web.dll file, which version is 2.0.50727.5420, but the replacing dll file's version is lower, which is 2.0.50727.4016.</p>
  
  <p>Anyway, it compiles!</p>