none
Outlook freeze when loading an VSTO Addin RRS feed

  • Question

  • Hello,

    I have a problem with the VSTO Runtime. Sometimes, when Outlook loads an VSTO Addin, the CPU-Load of the Outlook process goes up to 25% and Outlook freeze. Then I must delete some assemblies in the GAC folder:

    Microsoft.Office.Tools*

    Microsoft.VisualStudio.Tools*

    Now Outlook starts for some days and then I have the same problem until I delete the assemblies in the GAC folder again.

    With the process explorer I could see that Outlook hangs in the function "GetMetadataInternalInterfaceFromPublic" of the "clr.dll".

    Regards

    Nico

    Wednesday, March 25, 2015 10:29 AM

All replies

  • Hello Nico,

    I believe there is no need to remove assemblies from GAC.

    Check out the points described in the Resolving performance issues with loading Office add-ins (VSTO add-ins or Shared add-ins) article. Is the “Check for publisher's certificate revocation” option enabled on your problematic PC?

    Also you may find the following articles helpful:

    Delay-loading the CLR in Office Add-ins

    Improving the Performance of an Application-Level Add-in

    Load Add-In faster on cold bootThis addin caused outlook to start slowly

    Finally, if you use Outlook 2013 see Performance criteria for keeping add-ins enabled .

    Wednesday, March 25, 2015 11:06 AM
  • Hi,

    thanks for your fast answer. But I think it is not an performance issue because Outlook hangs in the splash-screen and does not start anymore.

    I have made a test. I have registered an VSTO Addin that does not exists on the disc. Then I have the same behavior that Outlook freeze at start up and i must kill outlook in the taskmananger. After Idelete the assemblies in the GAC, Outlook starts correct and I get the error message that the VSTO-manifest does not exist.

    Regards

    Nico

    Wednesday, March 25, 2015 11:32 AM
  • Nico,

    Try to disable all add-ins in Outlook and see what happens. Do you see the issue without any add-ins?

    Could you please also specify the build number of Outlook, VSTO runtime, .Net and OS version?

    Wednesday, March 25, 2015 2:21 PM
  • Hello,

    when I disable all Addins Outlook starts normal. Only when I enable an VSTO-Addin Outlook hangs at startup and I must kill the process. When there are only COM-Addins registered there is no problem. I think it has something to do with the VSTO-Runtime. 

    I have the problem with several Outlook versions (2010 and 2013) and Windows Versions (7, 8.1). The VSTO Runtime is 10.0.50903. On the Windows 7 Clients .net 4.5.2 is installed. But I have also had the Problem with .net 4.5.1.

    Regards,

    Nico

    Thursday, March 26, 2015 6:47 AM
  • Hi Nico,

    Visual Studio Tools for Office can write all errors that occur during
    startup to a log file or display each error in a message box. By default,
    these options are turned off for application-level projects. You can turn
    the options on by adding and setting environment variables. To display each
    error in a message box, set the VSTO_SUPPRESSDISPLAYALERTS variable to 0
    (zero). You can suppress the messages by setting the variable to 1 (one). To
    write the errors to a log file, set the VSTO_LOGALERTS variable to 1 (one).
    Visual Studio Tools for Office creates the log file in the folder that
    contains the application manifest. The default name is
    <Manifestname>.manifest.log. To stop logging errors, set the variable to 0
    (zero).

    1  Make sure you have the correct version of .NET framework installed.

    2    Make sure you have Office Primary Interop Assemblies (PIAs) installed on the target machine. You can check this by going to the Global Assembly Cache, GAC, (%systemroot%\assembly) and looking for assemblies beginning with “Microsoft.Office”. Also, make sure that you are referencing the Office PIAs (not Interop Assemblies) in the project references. You can confirm this by looking at the properties for the reference added. They should point to GAC.  To know more about PIAs, please refer:  Primary Interop Assemblies (PIAs) and Interop Assemblies (IAs) http://msdn2.microsoft.com/en-us/library/aa169585.aspx

    3 Make sure all the required dependencies for your Add-In are present/installed on the target machine. You can enable Fusion logs to detect missing dependencies. To enable Fusion logs, you can either use the “Assembly Binding Log Viewer” (fuslogvw) .NET framework tool or make registry entries to enable logging. [Please do make appropriate backup before making any registry changes]. Here are the registry entries that need to be made:

      1.       Open regedit and browse to “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion” 
      2.       Create a DWORD value by name “EnableLog” and set its value to 1. 
      3.        Create a DWORD value by name “ForceLog” and set its value to 1. 
      4.       Create a DWORD value by name “LogFailures” and set its value to 1. 
      5.       Create a String value by name “LogPath” and set its value to “c:\Fusion” 
      6.        Create the folder “c:\Fusion”

    After reproducing the issue, look at each of the files created under “C:\Fusion\ Default \<Application.exe>\” folder. Fix any failures and retry. To know more about Assembly Binding Log Viewer (fuslogvw), please refer: Assembly Binding Log Viewer (Fuslogvw.exe) http://msdn2.microsoft.com/en-us/library/e74a18c4(VS.80).aspx

    See Troubleshooting COM Add-In load failures for more information. 

    Thursday, March 26, 2015 8:45 PM
  • Hello,

    I have activated Fusion-Log and VSTO-Logging. No VSTO-Log-Files are generated. In the fusion-Logs are no errors. Here is an Screenshot from the Process-Explorer where you can see where Outlook hangs:

    Friday, March 27, 2015 9:44 AM
  • Hi Nico,

    Have you tried the steps of the blog post in Eugene's last reply?

    Troubleshooting COM Add-In load failures

    What have you got?


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, March 31, 2015 11:03 AM
    Moderator