I built an easy Excel Add-In in Visual Basic. It is running like a charm when I run it through Visual Studio, or even when I deploy it through Visual Studio. But if I deploy it in Visual Studio using the setup project to get an MSI file, it will be displayed normally in Excel, as before, but when I want to click a button on the form it just does not do anything. It seems like the button listener is not working.
It must be due to the fact that I used the MSI installer. I built it following the exact steps by Microsoft, here:
The good news is that you can see your add-in in the host application and it can be running. To find out what is wrong with the application you need to add any logging mechanisms to create logs and check what is wring with the code at runtime. Also you may consider deploying a debug version of assemblies with a *.pdb file and then attach a debugger to find out what is wrong with the application.
You can use the event viewer in Windows to see exception messages that are captured by the Visual Studio Tools for Office runtime when you install or uninstall Office solutions. You can use these messages from the event logger to resolve installation and deployment problems. See Event logging for Office solutions for more information.
If you need to log the add-in events you can use any .Net based components and libraries. For example, see What is the best way to write event log entries?.