How to Resolve the Unable to Cast COM Object Error When Publishing an Application in Visual Studio