After adding in the web services reference i am face with the error Task failed because “sgen.exe” was not found: solution. The issue is when Visual Studio 2008 tries to compile the site in the release mode it looks for sgen.exe fileto generate a serialization assembly and if this file is not available in C:\WINDOWS\Microsoft.NET\Framework\v3.5\ then it will fails to compile.
Solution 1:
Copy the sgen.exe file from C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\ toC:\WINDOWS\Microsoft.NET\Framework\v3.5\. This should solve your problem.
If solution 1 does not as you may not have sgen.exe file on your computer then you can try Solution 2.
Solution 2:
In Visual Studio open the project setting property then select the Build tab on the left hand side. Select the All Configurations from the Configuration drop down list. Then go down to the near the end of the panel and select Off from the drop down Generate Serialization assembly.









Leave a comment