none
Outlook 2003 Add-In is found in the registry with LoadBehavior = 3 but it is not loaded in the Outlook Application. RRS feed

  • Question

  • Hi,

    I have trouble deploying my Outlook 2003 Add-In created using VS 2008 and VSTO 2005 SE. I have included all the pre-requisites to the setup file and also the <add-in name>.dll.manifest file. I also used the SetSecurity project to grant full trust to the assembly. On debug mode, the Add-In is loaded on launch of Outlook. But when I install the Add-In using the .msi setup, the Add-In is not loaded in the Outlook application. I also cannot see it in the list of COM Add-Ins. But I can see it in the Current User registry. Am I missing something? I need your help on this.

    PS: I also develop the same Add-In in Outlook 2007 and I have no trouble with deploying it using the .msi setup installer.

    Thank You so much,

    Jessa

    Wednesday, May 2, 2012 8:23 AM

Answers

  • This might be long but I wish this could also help other AddIn developers facing this problem.

    I created Outlook 2007 AddIn in my development machine (Office 2007 Installed, Windows 7 Home Premium). When I publish or build this AddIn, a .vsto file is created, so it is easier to add it up including the .manifest file in the Setup project for installation. After completing this 2007 AddIn, I uninstalled Office 2007 and Installed Office 2003 in my development machine. (Yeah, I know its tedious.) Then I develop the Outlook 2003 AddIn. When I publish or build this AddIn, there is no .vsto file created. But I still went on the same process as my Outlook 2007 wherein I added the .manifest file in the Setup project. Since I am in my development machine, the AddIn gets installed at runtime. I disabled the AddIn installed through runtime in my Outlook application and used the Setup project to install the AddIn in my development machine. After installing it using the Setup installer, the AddIn gets loaded. When I used the same Setup exe in other machines with Office 2003, the AddIn gets installed (as seen in the Programs and Features of the machine and also in the Current User registry [Current User > Software > Microsoft > Office > Outlook > Addins] with LoadBehavior = 3)  but it is not loaded in the Outlook application and it is also not listed in the COM-Addins list. It seems like the installed AddIn in the registry is not "connected" to the Outlook application at all because if it does, then the LoadBehavior of the AddIn should change in the registry if an error occurred when the AddIn is being loaded.

    I also did set the VSTO_SUPPRESSDISPLAYALERTS to 0 and launch the Outlook application using the command line to see what is the error but there is no popup that shows an error. As I've said, it seems like the AddIn in the registry is not "connected" to the Outlook application.

    So in order to eliminate any more problems, I copied my Outlook 2003 Solution into my Virtual Machine (Office 2003 Installed, XP Professional SP3). I installed all the prerequisites and build the AddIn and Setup project in there. But the same thing happens, it is being registered but not loaded. So I decided to re-create my Outlook AddIn in the Virtual Machine (Good thing there are only few forms and classes). When I added an Outlook 2003 AddIn in my solution, the Setup project was also created, I noticed that the Registry entry of the 2003 AddIn is different because it created Class ID aside from the entry in [Current User > Software > Microsoft > Office > Outlook > Addins]. After adding up finishing touches (Launch Conditions, Prerequisites, etc) When I used the created Setup project to install the AddIn, I got "Could not load file or assembly 'Outlook_2003_AddIn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fbb512e32a1c5386' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)". Googled some answer for this and got the "Add the AddIn into the GAC" solution which I did (Created it using sn.exe) then build the Setup project again and installed the AddIn. Problem solved. *sigh* I used other machines with Office 2003 installed and the AddIn can now be loaded.

    Thanks for your kind answers. I have a long way to go in creating applications for MS Office. Have a nice day! =)
    Tuesday, May 8, 2012 1:07 AM

All replies

  • You say it's not listed as a COM AddIn. Could you say whether the AddIn is listed as 'inactive'? Or, not listed at all?
    Wednesday, May 2, 2012 1:37 PM
  • Have you tried Fusion logging to see why your addin is not being loaded? See http://www.hanselman.com/blog/BackToBasicsUsingFusionLogViewerToDebugObscureLoaderErrors.aspx for information on Fusion logging.
     
    What version of Outlook is installed on your development machine?
     
    Are you sure that your MSI for Outlook 2003 is setting the desired security?  Have you checked at runtime?
     
    Are you checking for and deploying all dependencies for your addin?
     
    If you run the MSI does the code work on your development machine?

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    Reminder Manager, Extended Reminders, Attachment Options
    http://www.slovaktech.com/products.htm
     
     
    "jessa.marie" <=?utf-8?B?amVzc2EubWFyaWU=?=> wrote in message news:aa738bdc-eeb6-4531-9eb4-816e7754825b...

    Hi,

    I have trouble deploying my Outlook 2003 Add-In created using VS 2008 and VSTO 2005 SE. I have included all the pre-requisites to the setup file and also the <add-in name>.dll.manifest file. I also used the SetSecurity project to grant full trust to the assembly. On debug mode, the Add-In is loaded on launch of Outlook. But when I install the Add-In using the ..msi setup, the Add-In is not loaded in the Outlook application. I also cannot see it in the list of COM Add-Ins. But I can see it in the Current User registry. Am I missing something? I need your help on this.

    PS: I also develop the same Add-In in Outlook 2007 and I have no trouble with deploying it using the .msi setup installer.

    Thank You so much,

    Jessa


    Ken Slovak MVP - Outlook
    Wednesday, May 2, 2012 2:43 PM
  • Hi,

    Have you created and set the VSTO_SUPPRESSDISPLAYALERTS environment variable to 0? This will show any errors on startup, but the stack traces are often cryptic. Is the manifest in the application folder? Is the LoadBehaviour set to 2 after you close Outlook? Outlook might have tried to go and get the application manifest from the value of the Manifest key in the registry, find it's not there or that it's corrupted, realise it can't load your addin and then disable it. Does your 2007 addin use ClickOnce? If so, it's going to be using a .vsto rather than a dll.manifest, which might be the difference between the two. 

    Richard

    Wednesday, May 2, 2012 2:43 PM
  • Hi Jessa,

    How is everything going?

    I've pick out a blog link from my collections, quite a helpful one.

    Link is: http://blogs.msdn.com/b/haahmadi/archive/2010/05/26/my-vsto-add-in-does-not-load.aspx

    Hope it helps.

    regards,

    Fermin

    Saturday, May 5, 2012 5:36 PM
  • This might be long but I wish this could also help other AddIn developers facing this problem.

    I created Outlook 2007 AddIn in my development machine (Office 2007 Installed, Windows 7 Home Premium). When I publish or build this AddIn, a .vsto file is created, so it is easier to add it up including the .manifest file in the Setup project for installation. After completing this 2007 AddIn, I uninstalled Office 2007 and Installed Office 2003 in my development machine. (Yeah, I know its tedious.) Then I develop the Outlook 2003 AddIn. When I publish or build this AddIn, there is no .vsto file created. But I still went on the same process as my Outlook 2007 wherein I added the .manifest file in the Setup project. Since I am in my development machine, the AddIn gets installed at runtime. I disabled the AddIn installed through runtime in my Outlook application and used the Setup project to install the AddIn in my development machine. After installing it using the Setup installer, the AddIn gets loaded. When I used the same Setup exe in other machines with Office 2003, the AddIn gets installed (as seen in the Programs and Features of the machine and also in the Current User registry [Current User > Software > Microsoft > Office > Outlook > Addins] with LoadBehavior = 3)  but it is not loaded in the Outlook application and it is also not listed in the COM-Addins list. It seems like the installed AddIn in the registry is not "connected" to the Outlook application at all because if it does, then the LoadBehavior of the AddIn should change in the registry if an error occurred when the AddIn is being loaded.

    I also did set the VSTO_SUPPRESSDISPLAYALERTS to 0 and launch the Outlook application using the command line to see what is the error but there is no popup that shows an error. As I've said, it seems like the AddIn in the registry is not "connected" to the Outlook application.

    So in order to eliminate any more problems, I copied my Outlook 2003 Solution into my Virtual Machine (Office 2003 Installed, XP Professional SP3). I installed all the prerequisites and build the AddIn and Setup project in there. But the same thing happens, it is being registered but not loaded. So I decided to re-create my Outlook AddIn in the Virtual Machine (Good thing there are only few forms and classes). When I added an Outlook 2003 AddIn in my solution, the Setup project was also created, I noticed that the Registry entry of the 2003 AddIn is different because it created Class ID aside from the entry in [Current User > Software > Microsoft > Office > Outlook > Addins]. After adding up finishing touches (Launch Conditions, Prerequisites, etc) When I used the created Setup project to install the AddIn, I got "Could not load file or assembly 'Outlook_2003_AddIn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fbb512e32a1c5386' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)". Googled some answer for this and got the "Add the AddIn into the GAC" solution which I did (Created it using sn.exe) then build the Setup project again and installed the AddIn. Problem solved. *sigh* I used other machines with Office 2003 installed and the AddIn can now be loaded.

    Thanks for your kind answers. I have a long way to go in creating applications for MS Office. Have a nice day! =)
    Tuesday, May 8, 2012 1:07 AM
  • I have seen this link too and did what was told. But I guess my problem was due to the incorrect creation of the Setup project from the start. T__T

    Thanks for your kind answer! =)

    Tuesday, May 8, 2012 1:09 AM
  • Hi Jessa,
     
    I’m glad to see that you have solved your issue. Thanks for sharing your experience here. It’s very beneficial for other community members who have similar problem to see how you solved your question.
     
    Best Regards,
    Quist

    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us

    Friday, May 25, 2012 2:12 AM
    Moderator