Friday, November 12, 2010

Task failed because “sgen.exe” was not found, or the correct Microsoft Windows SDK is not installed.

If you started using Visual Studio 2008 and didn't have a previous version of it then you will get this error trying to compile project that reference a web service. It only happens if you use .NET 2.0 version and compile in Release mode.

it's actually looking for a 2.0 component from the 2.0 SDK that is not being installed with your VS2008.

The solution:
Download and install .NET 2.0 SDK (from the Microsoft website) then copy the sgen.exe file from C:\Program Files\Microsoft.NET\SDK\v2.0 to C:\Windows\Microsoft.NET\Framework\v3.5

No comments:

Post a Comment