Last Updated: July 12, 2018
·
13.97K
· jsigman

SSIS Error: The binary code for the script is not found

Using VS 2015 and Component Script can cause a random error: "The Binary Code for the Script is Not Found."

Sometimes this is caused by a compilation error due to a bug in the script. Normally this is resolved by simply building the component a reviewing the errors found.

Other times this error is caused by the bugginess of SSIS and there is no good reason why the script fails to precompile. There are no bugs and the script has actually run perfectly in the past.

Here are several steps I have used to overcome this annoying issue:
1. Open the script in the VSTA editor as normal
2. Select "Run Code Analysis" on the Solution from the Analyze menu
3. This performs a "Rebuild ALL" that may solve a few issues
4. Save the script and close the VSTA editor (the red X should go away)

Another trick is to:
1. Open the script in the VSTA editor as normal
2. Make a small edit to the code (I generally just add a single space somewhere)
3. Select the Clean option from the Build menu
4. Then select Build from the Build menu
5. Save the script and close the VSTA editor (the red X should go away)

If the above steps do not work then you may have to recreate the script component:
1. Copy the entire script into notepad
2. Delete the script component
3. Add a new script component
4. Paste the code from notepad into the VSTA editor
5. Build the component
6. Save the script and close it
7. Save the project
8. Re-Open the project
9. Run the project to see if the error is resolved

Usually, this will resolve the error for a while until something changes with SSIS. (Microsoft Update, Windows Update, etc)
Then when it breaks you will have to repeat the steps above and it might fix it.