Search code examples
visual-studiologginginstallationcustom-action

Logging service for a visual studio C# custom action


To help isolate problems that may occur when users try to use my installer, I have decided to log installation progress, states, errors, and warnings in a log file from my custom actions. However, none of the popular logging packages seem to be viable since they require configuration of the calling assembly (log4net for example). And I have also read that you cannot do MSI logging through Installer classes after trying and failing. For now I can simply resort to basic file operations to log the information. Is this what most people do who write custom actions with logs, or is there a another way I have not considered?


Solution

  • In the end, my installer ended up needing an external ui handler. This caused me to switch from setup & deployment to wix/votive for my MSI needs. As a result the DTF custom actions were able to use MSI logging.