title: Visual Studio 2010 error: "Project Target Framework Not Installed" when opening a .NET 4.0 project
body: <p>I am experiencing a rather disconcerting issue with one of my development machines that I hope someone can advise me on.</p>
  
  <p>I have a large Visual Studio 2010 VB solution, targeting the .NET Framework 4.0 which opens and works just find on numerous Visual Studio 2010 installations - except one. The 'error' (more a message) when opening the solution says: </p>
  
  <blockquote>
    <p>Project Target Framework Not Installed</p>
    
    <p>The VB project  is targeting '.NETFramework,Version=v4.0",
    which is not installed on this machine. You must download this
    framework in order to open and build this project. In order to
    proceed, you must select an option below.</p>
  </blockquote>
  
  <p>Here's a screenshot with the full context:</p>
  
  <p><a href="http://img507.imageshack.us/i/errorlc.jpg/">http://img507.imageshack.us/i/errorlc.jpg/</a></p>
  
  <p>I have tried:</p>
  
  <ol>
  <li>Repairing (didn't fix), uninstalling and reinstalling Visual Studio (didn't fix)</li>
  <li>Repairing (didn't fix), uninstalling and reinstalling .NET Framework 4.0 (didn't fix)</li>
  </ol>
  
  <p>Retrying step number 1 again after step number 2 (didn't fix).</p>
  
  <p>What worked temporarily was when I used a .NET Framework removal tool in order to remove all traces of the .NET Framework 4.0 from the machine (including the registry) and then installing the .NET Framework 4.0 again. However the error has returned.</p>
  
  <p>I'm not sure if this is a problem with some .NET Framework 4.0 file corruption, something within Visual Studio or simply that Visual Studio cannot find the .NET Framework 4.0. (I have found several possible 'explanations' but nothing that resolves this issue.</p>
  
  <p>The machine is running Windows 7 (64 bit).</p>
  
  <p>Any ideas towards troubleshooting this issue would be warmly received!</p>