In my simple C# script task was getting the error -
Package Validation Error
Error at Send Mail: The binary code for the script is not found. Please
open the script in the designer by clicking Edit Script button and
make sure it builds successfully. Error at Send Mail: There were
errors during task validation.
In my case I was just using a simple try catch block to catch Exception in simple code. I added a using System.Exception;
I got the error after that. I just realized that this import is not needed and is the cause of the error. I don't know why it causes an error in SSIS.