none
What are reasons for Outlook 2007 to not load CLR 4 with installed VSTO 2010 and a registered managed application level add-in targeting .net 4?

    Question

  • Hi!

    I have developed an application level add-in for Outlook targeting Outlook 2010 and .NET 4 and I want to run it on Outlook 2007, which should not be a problem due to the new "no pia" feature of .NET 4 (see this blog post).

    However, after deploying the add-in with my Windows Installer package (the same package works for Outlook 2010), the add-in does not get loaded correctly and its load behavior is set to 2.

    The test machine has the following software installed (in the given order):

    • Microsoft Windows XP with Service Pack 2 (x86)
    • Microsoft Office 2007 Enterprise
    • Windows Installer 3.1
    • Microsoft Windows XP Service Pack 3 (x86)
    • Microsoft .NET Framework 4.0 (Extended)
    • Microsoft Visual Studio 2010 Tools for Office Runtime (x86)

    The utility assemblies are included in my deployment location and the add-in is registered correctly (shows up in Outlook trust center and deployment manifest is also included). I do not reference any third party libraries.

    The strange thing is that the CLR 4 is not even loaded into Outlook, which I can see through the Visual Studio 2010 Remote Debugger. When I create an test add-in on my development machine and throw an exception on add-in startup, the load behavior also gets set to 2 on startup (without debugging), but at least the CLR 4 gets loaded into the Outlook process. Has anyone ideas what (probably missing dependency) could cause the VSTO 2010 Runtime to not load .NET Framework 4? I have also tried reinstalling VSTO which caused no effect.

    Best Regards,
    Oliver Hanappi

    Monday, September 06, 2010 12:54 PM

Answers

  • Hi Olivier,

    Can you please try to install Hotfix http://support.microsoft.com/kb/976477/

    Below is the excerpt from the KB article

    Office 2007 does not load VSTO add-ins unless CLR 2.0 is on the machine. This is problematic for solutions that target CLR 4.0 or greater because they install but do not run on machines without CLR 2.0. When the add-in tries to load, end users are presented with a misleading error message or no error message at all. This behavior makes it difficult for end users to troubleshoot the issue.

     


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Monday, September 06, 2010 5:17 PM
    Moderator
  • Hi Olivier,

    You will need Office 2007 SP2 and above to installed. Please install all the latest Windows update and then install the hotfix.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Tuesday, September 07, 2010 9:33 AM
    Moderator

All replies

  • Hi Olivier,

    Can you please try to install Hotfix http://support.microsoft.com/kb/976477/

    Below is the excerpt from the KB article

    Office 2007 does not load VSTO add-ins unless CLR 2.0 is on the machine. This is problematic for solutions that target CLR 4.0 or greater because they install but do not run on machines without CLR 2.0. When the add-in tries to load, end users are presented with a misleading error message or no error message at all. This behavior makes it difficult for end users to troubleshoot the issue.

     


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Monday, September 06, 2010 5:17 PM
    Moderator
  • Hi!

     

    Unfortunately, the hotfix cannot be installed due to the following error message:

     

    ---------------------------

    Hotfix for Office (KB976477)

    ---------------------------

    The expected version of the product was not found on the system.

    ---------------------------

    OK   

    ---------------------------

    Tuesday, September 07, 2010 7:55 AM
  • Hi Olivier,

    You will need Office 2007 SP2 and above to installed. Please install all the latest Windows update and then install the hotfix.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Tuesday, September 07, 2010 9:33 AM
    Moderator
  • Hi!

    It works also for Office 2007 SP1. I installed the hotfix and it works now.

    Thank you for your help!

    Tuesday, September 07, 2010 9:54 AM