Using Microsoft.Office.Interop.Excel.Application class causes Validation Error in Invoke Code activity

Writing a script that uses Microsoft.Office.Interop.Excel.Application causes validation and cannot be run.