Getting Exception Type : InvalidCastException

How about implementing dispatcher. it will release unmanaged resources used by your application.
Or something like this using dispose for the reference.

PS: Does both studio has same excel packages version?. Can you update if available and try.
How about using workbook activity not within excel scope.