We have developed a custom outlook addin which has a log file for logging. For installation, we are using .msi installer created using installshield. Installation is successful and functionalities are good except logging. There is only one entry in the log file after installation, rest of the actions are not logging as expected. But the same is fine, if we install the addin using .exe installer created using 'publish' option in VisualStudio 2010. As .msi is the expected installer, any help in fixing this issue is appreciated.

- 8,028
- 17
- 51
- 70

- 11
- 1
-
It's not clear what to say about the installation side of this - the plugin isn't logging, and that's a code issue that needs debugging. You may be running as a limited user and trying to write to restricted areas. That wouldn't happen with a ClickOnce install - they are per user and you may be logging into places that are not restricted to admins. – PhilDW Apr 07 '15 at 18:06
-
PhilDW, If code is the issue, then not sure, how come EXE installer created using "publish" option is working fine (i.e all log entries from the app are properly seen in the logs). In both the conditions (MSI|EXE) logs are generated in the same location path and user rights to install the add-in, run the add-in etc.. remains same. – Saravanan P Apr 09 '15 at 13:18
-
FYI, We developed add-in for Outlook (2007/2010/2013) using VSTO 2010 (http://www.microsoft.com/en-us/download/details.aspx?id=44074). For logging, we use Log4 NET-v4.0.30319 logging framework within the application. Installshield version is 2013 v20 (Premier Edition with Virtualization pack), VisualStudio is 2010-Professional. – Saravanan P Apr 09 '15 at 13:36
-
Same behavior is observed in Outlook 2007, 2010 and 2013. In all cases, add-in is enabled. In both EXE and MSI based binary, add-in functional features work perfectly fine for all use cases. The only issue we see is related to application logs not properly coming in the log file when we use the MSI based installer.(i.e, has logs of startup and it stops after initialization) – Saravanan P Apr 09 '15 at 13:37
-
Savravana - because, as I said, a Publish that creates a ClickOnce install will always result in a per user setup into folders that limited users can access, at least that's a possibility in the absence of any information on whether the MSI install is per user or per machine, and the folder to which the logging is being attempted (which may not be accessible to limited users). There'd no data, all I can offer is areas for you to look at. – PhilDW Apr 09 '15 at 16:40
-
Phil, MSI installer we use on per user basis only...same as ClickOnce install. – Saravanan P Apr 10 '15 at 08:32
-
One more issue, when we install using MSI installer, we noticed double entry of our plugin name under programs in control panel. – Saravanan P Apr 10 '15 at 10:24
-
Double entry jut means tw oversions installed. Maybe you built 2 with different ProductCodes and installed them; maybe 1 is per user and the other per machine. – PhilDW Apr 13 '15 at 16:39
1 Answers
Saravanan,
Make sure that you did all the steps described in the Deploying an Office Solution by Using Windows Installer article.
Is your add-in loaded by Outlook? Did you have a chance to check out the Disabled Items list?
The fact is that Outlook can disable add-ins that behave unexpectedly. If an application does not load your add-in, the application might have hard disabled or soft disabled your add-in.
Hard disabling can occur when an add-in causes the application to close unexpectedly. It might also occur on your development computer if you stop the debugger while the Startup event handler in your add-in is executing.
Soft disabling can occur when an add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable an add-in if it throws an unhandled exception while the Startup event handler is executing.
When you re-enable a soft-disabled add-in, the application immediately attempts to load the add-in. If the problem that initially caused the application to soft disable the add-in has not been fixed, the application will soft disable the add-in again.
Also Outlook 2013 monitors add-in performance metrics such as add-in startup, shutdown, folder switch, item open, and invoke frequency. Outlook records the elapsed time in milliseconds for each performance monitoring metric. For example, the startup metric measures the time required by each connected add-in during Outlook startup. Outlook then computes the median startup time over 5 successive iterations. If the median startup time exceeds 1000 milliseconds (1 second), then Outlook disables the add-in and displays a notification to the user that an add-in has been disabled. The user has the option of always enabling the add-in, in which case Outlook will not disable the add-in even if the add-in exceeds the 1000 millisecond performance threshold.

- 47,483
- 3
- 24
- 45
-
Eugene, Yes, followed the link you shared during installer creation. Installation in through. Post installation, Outlook add-in works fine. It is not disabled. Problem is only with add-in logging. – Saravanan P Apr 09 '15 at 06:44
-
-
FYI, We developed add-in for Outlook (2007/2010/2013) using VSTO 2010 (http://www.microsoft.com/en-us/download/details.aspx?id=44074). For logging, we use Log4 NET-v4.0.30319 logging framework within the application. Installshield version is 2013 v20 (Premier Edition with Virtualization pack), VisualStudio is 2010-Professional. – Saravanan P Apr 09 '15 at 13:47