locked
Unable to load Outlook 2007 add-in. RRS feed

  • Question

  • Hello,

             I have developed an Outlook Add-In using Visual Studio 2008 and VSTO 3.0 targetted for outlook 2007.  It loads fine in the development machine.

             I have developed an installer for it and installed all the following prerequisites in a different xp sp2 machine for the end user:

    MS-Office 2007 and Microsoft .NET Framework 3.5 sp1
    Microsoft Visual Studio Tools for the Microsoft Office system (version 3.0 Runtime)
    Primary Interop Assemblies for the 2007 Microsoft Office system.
    Windows Installer 3.1

              Under the 'User code groups', I have given full trust to the entire folder where I have the dll.  Everything is fine till here, but I still get the error 'Not loaded. a runtime error occurred during the loading of the com add-in' and the Load Behavior changes to 2 instead of being three.

               I have been trying hard to fix this but nothing is favouring my efforts.  Any help would be greatly appreciated.  Thanks in advance

    --  Varma

     

     

    Saturday, November 6, 2010 3:31 PM

Answers

  • Amreen,

               Thanks for you input.


               I changed the manifest value to the Manifest value to 'C:\Program Files\ABC\crmEZOutlook4Add-In\crmEZOutlook4.vsto|vstolocal'.
    Now, on startup outlook slapped me with the following error:
    From: file:///C:/Program Files/ABC/crmEZOutlook4Add-In/crmEZOutlook4.vsto
    Application manifest has either a different computed hash than the one specified or no hash specified at all.

               As a next step,

    1)  I edited the 'ThisAddIn.cs' file and built the entire project and ensured that files below show the latest modified date(crmEZOutlook4 is my product):

    crmEZOutlook4.vsto
    crmEZOutlook4.dll
    crmEZOutlook4.dll.manifest
    crmEZOutlook4.pdb
    crmEZOutlook4.dll (Web Configuration File) need not show the latest modified date).

    Some other office reference dll's will have 'version 12.0.0.0' and remaining 'version 9.0.0.0'.

     


    2)           In the regsitry, under the HKEY_CURRENT_USER hierarchy, The 'Manifest' value of the AddIn key should be pointed to
    "C:\Program Files\ABC\crmEZOutlook4Add-In\crmEZOutlook4.vsto|vstolocal".


    3)           Under the user code groups of 'Microsoft .NET Framework 2.0 Configuration' in 'Administrative Tools', ensure the
    following:
    a) The name in the General tab.
    b) Under the 'Membership condition' tab,
        Choose the condition type for this code group:  URL
        URL       :  C:\Program Files\CompanyName\productname\*
    c) Permission set tab
         Permission Set: FullTrust.


    4) Depending on your product features, if you need vsto 3.0 sp1

    HKEY_LOCAL_MACHINE -> SOFTWARE -> Microsoft -> vsto runtime Setup ->

    v9.0.21022  indicates VSTO 3.0 runtime
    v9.0.30729  indicates VSTO 3.0 runtime SP1

    You may not be able to see 'VSTO 3.0 runtime SP1' in the 'Add/Remove programs' of control panel after u install this;
    it may still remain as 'VSTO 3.0 runtime' but registry entry is perfect to know its existence.

    After all this,  My outlook add-in loaded fine.

        
    Thanks & Regards,
    Varma

    • Marked as answer by Varma G V S Monday, November 8, 2010 4:34 PM
    Monday, November 8, 2010 4:30 PM

All replies

  • Hi ,

        You can set VSTO_SUPRESSDISPLAYALERTS to "0" in Environment variables i.e.,

    Right click MyComputer-->Properties-->Advanced tab

    Click on Environment Variables button

    Either in User Variables or System Variables Click on New

    VariableName= VSTO_SUPPRESSDISPLAYALERTS

    Value=0

    (It will display error in Message Box)

    or 

    VariableName=VSTO_LOGALERTS

    value = 1

    (It will write it to in a file

    Monday, November 8, 2010 5:56 AM
  • Amreen,

                Thanks for your reply.  I have set the value to 0 to display the error in Message Box. The message box shows the following error.

    The customization assembly associated with this document could not be loaded.  The application manifest might be corrupted.  You can still edit and save the document.  Contact your administrator or the author of this document for further assistance.

    An unexpected element "description" was found in the XML.


    ************** Exception Text **************
    Microsoft.VisualStudio.Tools.Applications.Runtime.InvalidManifestException: An unexpected element "description" was found in the XML.
       at Microsoft.VisualStudio.Tools.Applications.Runtime.AppManifest.Load(XmlReader reader)
       at Microsoft.VisualStudio.Tools.Applications.Runtime.AppManifest.FromXml(String manifest)
       at Microsoft.VisualStudio.Tools.Applications.Runtime.AppManifest.Create(String manifestString)
       at Microsoft.VisualStudio.Tools.Applications.Runtime.AppInfo.CreateManifest(IAppInfo appInfo)
       at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadAndUpdateApplicationManifest(IAppInfo appInfo, Uri documentDirectoryUri, Uri& newAppManifestPath, Boolean& appManifestDirty)
       at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.CreateCustomizationDomainInternal(Uri uriFullDocumentDirectory, Uri uriFullDocFilePath, String documentName, IHostServiceProvider hostCallback, IAddinSecurityManager secman, AppManifest& applicationManifest, Boolean& manifestDirty, IAppInfo& appInfo)
       at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.CreateCustomizationDomain(String applicationDomainPath, String documentName, IHostServiceProvider hostCallback, IExecuteCustomization& executor)
       at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManager.CreateCustomizationDomain(String applicationDomainPath, String documentName, IHostServiceProvider hostCallback, IExecuteCustomization& executor)


    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    Microsoft.VisualStudio.Tools.Applications.Runtime
        Assembly Version: 8.0.0.0
        Win32 Version: 8.0.50727.940
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    Microsoft.Office.Tools.Common
        Assembly Version: 8.0.0.0
        Win32 Version: 8.0.50727.940
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Tools.Common/8.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------

          I have pointed the regedit setting for Manifest to 'C:\Program Files\ABC\crmEZOutlook4Add-In\crmEZOutlook4.dll.manifest'.  Any guess what is going wrong.

    -- Varma


        

     

     

              

    Monday, November 8, 2010 7:42 AM
  • Hi Varma,

         If it is a VSTO addin then change the Manifest value to 'C:\Program Files\ABC\crmEZOutlook4Add-In\crmEZOutlook4.vsto|vstolocal' and try

    Thanks and Regards

    Amreen

    • Proposed as answer by amreen Monday, November 8, 2010 4:20 PM
    Monday, November 8, 2010 8:04 AM
  • Amreen,

               Thanks for you input.


               I changed the manifest value to the Manifest value to 'C:\Program Files\ABC\crmEZOutlook4Add-In\crmEZOutlook4.vsto|vstolocal'.
    Now, on startup outlook slapped me with the following error:
    From: file:///C:/Program Files/ABC/crmEZOutlook4Add-In/crmEZOutlook4.vsto
    Application manifest has either a different computed hash than the one specified or no hash specified at all.

               As a next step,

    1)  I edited the 'ThisAddIn.cs' file and built the entire project and ensured that files below show the latest modified date(crmEZOutlook4 is my product):

    crmEZOutlook4.vsto
    crmEZOutlook4.dll
    crmEZOutlook4.dll.manifest
    crmEZOutlook4.pdb
    crmEZOutlook4.dll (Web Configuration File) need not show the latest modified date).

    Some other office reference dll's will have 'version 12.0.0.0' and remaining 'version 9.0.0.0'.

     


    2)           In the regsitry, under the HKEY_CURRENT_USER hierarchy, The 'Manifest' value of the AddIn key should be pointed to
    "C:\Program Files\ABC\crmEZOutlook4Add-In\crmEZOutlook4.vsto|vstolocal".


    3)           Under the user code groups of 'Microsoft .NET Framework 2.0 Configuration' in 'Administrative Tools', ensure the
    following:
    a) The name in the General tab.
    b) Under the 'Membership condition' tab,
        Choose the condition type for this code group:  URL
        URL       :  C:\Program Files\CompanyName\productname\*
    c) Permission set tab
         Permission Set: FullTrust.


    4) Depending on your product features, if you need vsto 3.0 sp1

    HKEY_LOCAL_MACHINE -> SOFTWARE -> Microsoft -> vsto runtime Setup ->

    v9.0.21022  indicates VSTO 3.0 runtime
    v9.0.30729  indicates VSTO 3.0 runtime SP1

    You may not be able to see 'VSTO 3.0 runtime SP1' in the 'Add/Remove programs' of control panel after u install this;
    it may still remain as 'VSTO 3.0 runtime' but registry entry is perfect to know its existence.

    After all this,  My outlook add-in loaded fine.

        
    Thanks & Regards,
    Varma

    • Marked as answer by Varma G V S Monday, November 8, 2010 4:34 PM
    Monday, November 8, 2010 4:30 PM