are you exporting all references. like all dlls are going to the install folder of your addin. this is probably your issue.
set copy local to true for non microsoft DLL files.
send screenshot of your project References please
Do a try-catch on your ConnectToSw to see if there any exceptions while loading
@Artem, Thanks a ton!
It was issue with the file location.
When I debug the code it looks for a file in my project's folder and when I run Solidworks directly then it expects file to be in SolidWorks folder.
In any case I should have added try-catch :-\ my bad.
Thanks for your reply,