C# script task error(binary code for the script is not found)

Kathiravan P 0 Reputation points
2026-10-07T13:53:15.2833333+00:00

Our SSIS package is successfully running in Production environment. We received a request to add some extractions in the same package and the existing package has many C# script task. Now we are trying to modify and runs the package the package in non-prod and gets error in C# script task. That error shows binary code for the script is not found error.

Version: 2019 (VS, SQL Server)

SQL Server Integration Services
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-10-07T13:53:29.7633333+00:00

    In SSIS 2019, Script Task scripts are precompiled. That error means the package does not contain the compiled script binary that the runtime expects.

    Use this path to fix it:

    1. Open the package in Visual Studio/SSDT.
    2. Open each failing Script Task Editor.
    3. Select Edit Script to open VSTA.
    4. Make a trivial change if needed, such as adding a comment.
    5. Save and close VSTA so the script is compiled again.
    6. Rebuild the SSIS project.
    7. Redeploy the rebuilt package, preferably as the rebuilt project output.

    Important checks:

    • The machine that runs the package must have VSTA installed.
    • In SSIS 2008 and later, including SQL Server 2019, all scripts are precompiled.
    • If the package was modified but the script binary was not regenerated, runtime can fail with errors such as:
      • DTS_E_BINARYCODENOTFOUND: the script is configured as precompiled, but binary code is not found.
      • DTS_E_SCRIPTTASK_BINARYITEMNOTFOUNDEXCEPTION: a binary item was not found in the package.
    • The script is stored in the package definition, not as a separate script file, so redeploying the rebuilt package is required.

    If this only happens in non-prod while production still works, the most likely cause is that the non-prod package was deployed without regenerated script binaries, or it was rebuilt/deployed from a different SSIS designer/runtime state. Re-editing the script, rebuilding, and redeploying is the supported fix.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.