Error message when you try to build an SSIS script task in SQL Server 2008: "Task failed because 'sgen.exe' was not found, or the correct Microsoft Windows SDK is not installed"

Article translations Article translations
Article ID: 955715 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

Consider the following scenario:
  • In Microsoft SQL Server 2008, you add a Web service to a SQL Server Integration Services (SSIS) script task.
  • The Windows software development kit (SDK) is not installed on the computer.
  • You try to build the SSIS script task.
In this scenario, you receive the following error message:
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.

CAUSE

This issue occurs because the default setting for the SSIS script task creates the serialization assembly. The serialization assembly requires files that may not be installed by SQL Server 2008 alone.

RESOLUTION

To resolve this issue, use one of the following methods:
  • Install the Windows SDK.

    To download and to install the Windows SDK for Windows Server 2008 and for the Microsoft .NET Framework 3.5, visit the following Microsoft Web site:
    http://www.microsoft.com/downloads/details.aspx?FamilyID=e6e1c3df-a74f-4207-8586-711ebe331cdc&displaylang=en
    Note The Windows SDK is also available when you install Microsoft Visual Studio 2008.

    For more information about how to obtain Visual Studio 2008 Service Pack 1 Beta, click the following article number to view the article in the Microsoft Knowledge Base:
    945140 Visual Studio 2008 Service Pack 1 Beta release notes and a list of fixed issues
  • Disable the Generate serialization assembly option. To do this, follow these steps:
    1. Click Start, point to Programs, point to Microsoft SQL Server 2008, and then click SQL Server Business Intelligence Development Studio.
    2. Open the project file or the solution file.
    3. In Solution Explorer, double-click the SSIS Package to open the Package Designer.
    4. Double-click Script Task in the Package Designer to open the Script Task Editor dialog box.
    5. Click Edit Script to open the Microsoft Visual Studio Tools for Applications (VSTA) IDE.
    6. In Project Explorer, right-click the project, and then click Properties.
    7. Click the Build tab. In the Output area, click Off in the Generate serialization assembly list.
    8. On the File menu, click Exit.

Properties

Article ID: 955715 - Last Review: March 19, 2009 - Revision: 2.0
APPLIES TO
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Express
  • Microsoft SQL Server 2008 Express with Advanced Services
  • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 Standard Edition for Small Business
  • Microsoft SQL Server 2008 Web
  • Microsoft SQL Server 2008 Workgroup
Keywords: 
sql2008relnoteintegrationservices sql2008relnote kbexpertiseadvanced kbtshoot KB955715

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com