“An invalid VARIANT was detected during a conversion from an unmanaged VARIANT to a managed object. Passing invalid VARIANTs to the CLR can cause unexpected exceptions, corruption or data loss.”
Just go to the Debug menu in Visual studio and select Exceptions
Click and expand the Manage Debugging Assistants
Find the Invalid Variant node and uncheck the Thrown check box.
Click Ok and run the application, That’s all! Happy Programming..! If you want to read more about this issue, just read this post! 🙂