I fought for a couple of minutes with this error and I thought to share with you my solution.
The error was on my build machine which wasn’t having Windows SDK and I wasn’t planning to install it either.
I was having HKLM\SOFTWARE\Microsoft\Microsoft SDKs\.NETFramework\v2.0 key and the InstallationFolder key with the value C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\ so I thought about adding the key that was normally generated by Windows SDK.
So, I added HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A key with the InstallationFolder key pointing to the same value as above and copied the missing sgen.exe into the bin\ folder under the above mention location.
I queued a new build a everything worked like a charm.
I hope this helps,