title: Task failed because "sgen.exe" was not found
body: <p>I am getting the following error when attempting to build my project in Visual Studio 2008 Professional Edition:</p>
  
  <blockquote>
    <p>Task failed because “sgen.exe” was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for “sgen.exe” in the “bin” subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A. You may be able to solve the problem by doing one of the following:  </p>
    
    <ol>
    <li>Install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5.  </li>
    <li>Install Visual Studio 2008.  </li>
    <li>Manually set the above registry key to the correct location.  </li>
    <li>Pass the correct location into the “ToolPath” parameter of the task.</li>
    </ol>
  </blockquote>
  
  <p>I tried downloading Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, and still get the error. I also tried downloading the Windows 7 SDK and .NET Framework 3.5 and still same result.</p>
  
  <p>I also tried to manually editing the registry to change the InstallationFolder and I tried repairing the Visual Studio install.</p>
  
  <p>The project was originally created on Windows XP and I am trying to compile on a reformatted machine running Windows 7 Enterprise. </p>