none
Any experience ngen'ing a Word VSTO AddIn RRS feed

  • Question

  • Hello All,

    Does anyone have any experience using ngen.exe on an Office VSTO 4 AddIn to speed up application startup time??  Can ngen.exe be done on an AddIn??  Are there any issues I should be aware of??  I'm mostly interested in an Addin for 64-bit versions of Word 2010 and Word 2013.  I believe this has to be done as part of the "installation process", correct??

    Any pointers / experiences would be appreciated.

    Thanks, WordRake

    Tuesday, June 4, 2013 6:33 PM

Answers

  • Using "InstallShield" installer and it has a very simple setting to add ngen'ing of the addin dll.  This worked quite well.  You just have to remember NOT to include ngen in the uninstall if you are running on .NET 4.0 or greater.  ngen Uninstall is automatic in .NET 4 or greater.

    Also, have to be careful if you support 32-bit and 64-bit addins as the ngen instance is different and you have to use the correct one for the correct bitness.

    WordRake

    • Marked as answer by WordRake Friday, June 14, 2013 11:25 PM
    Friday, June 14, 2013 11:25 PM

All replies

  • I recall investigating this for my email plugins. I think you will have to place you assemblies into GAC to be able to Ngen them during install.

    My clients (some of them) experienced a noticeable delay after clicking Send button in Outlook and Groupwise.(on the first run) My solution was to preload assemblies on Application startup. Outlook has to do a lot of things on startup (loading addins, checking data files, etc....), so adding a few extra seconds to preload my DLLS didn't effect the users experience much.

    Regards,

    Michael

    Thursday, June 6, 2013 12:02 AM
  • Using "InstallShield" installer and it has a very simple setting to add ngen'ing of the addin dll.  This worked quite well.  You just have to remember NOT to include ngen in the uninstall if you are running on .NET 4.0 or greater.  ngen Uninstall is automatic in .NET 4 or greater.

    Also, have to be careful if you support 32-bit and 64-bit addins as the ngen instance is different and you have to use the correct one for the correct bitness.

    WordRake

    • Marked as answer by WordRake Friday, June 14, 2013 11:25 PM
    Friday, June 14, 2013 11:25 PM