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:
- Install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5.
- Install Visual Studio 2008.
- Manually set the above registry key to the correct location.
- 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 Windows XP and I am trying to compile on a reformatted machine running Windows 7 Enterprise.
copy /y “C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sgen.exe” “C:\WINDOWS\Microsoft.NET\Framework\v3.5\”
See the explanation here:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With