Task failed because "sgen.exe" was not found
Posted
by Kinze
on Stack Overflow
See other posts from Stack Overflow
or by Kinze
Published on 2009-08-19T19:01:47Z
Indexed on
2010/04/23
7:23 UTC
Read the original article
Hit count: 657
windows-7
|visual-studio-2008
I am getting the following error when attempting to build my project in Visual Studio 2008 Professional Edition:
*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: 1) Install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5. 2) Install Visual Studio 2008. 3) Manually set the above registry key to the correct location. 4) Pass the correct location into the “ToolPath” parameter of the task.*
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.
I also tried to manually editing the registry to change the InstallationFolder and I tried repairing the Visual Studio install.
The project was originally created on WinXP and I am trying to compile on a reformatted machine running Windows 7 Enterprise.
© Stack Overflow or respective owner