I have a process that had been deployed to a production SQL Server SSIS catalog for a couple years, and had been working fine daily. Recently an update was made and deployed. It turns out that source control didn't have the latest working revision (probably my fault!). I reverted to the most recent working version by using the GUI in SSMS and now, whenever I run the package I get "Exception has been thrown by the target of an invocation" at a C# Script Task.
The script task itself doesn't execute, so adding breakpoints inside does nothing. It's SSIS trying to execute the task that is erroring. The script has a reference to BouncyCastle's crypto library. When I comment out all the code that references the library, the script task executes successfully. I can even keep in the using statements.
I have tried removing the reference and re-adding it to no avail.