none
Outlook Add-in disabled by an error in ClickOnce auto-update RRS feed

  • Question

  • Hi,

    We are having an error that rarely occurs with the ClickOnce auto-update on our Outlook Addin wherein the Addin gets disabled when this error happens. So it happens when the Outlook Addin is update-to-date then all of a sudden the auto-update dialog comes out of nowhere and closes and then Addin gets disabled. We have VSTO Runtime version 10.0.40820 (latest version) installed on our users' PC, Outlook is version 14.0.7106.5003 (64-bit) Part of Microsoft Office Professional Plus 2010 / Outlook version 15.0.4551.1511 (64-bit) Part of Microsoft Office Professional Plus 2013, and .Net Framework 4.0 / .Net Framework 4.5

    We were able get the error log from the Event Viewer, see error below:

    Customization URI: http://**********.net/ftp/******/********/

    Exception: Customization could not be loaded because the application domain could not be created.

    ************** Exception Text **************

    Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException: Customization could not be loaded because the application domain could not be created. ---> System.NullReferenceException: Object reference not set to an instance of an object.

       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.GetAssemblyDataFromManifests(String solutionLocation, String manifestLocator, String documentName, Boolean showUIDuringDeployment, CustomizationType customizationType, OfficeVersion officeVersion, IHostServiceProvider interopServiceProvider)

       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String solutionLocation, String manifestName, String documentName, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, Boolean useFastPath, IntPtr& executor)

       --- End of inner exception stack trace ---

    ************** Loaded Assemblies **************

    mscorlib

        Assembly Version: 4.0.0.0

        Win32 Version: 4.0.30319.18052 built by: FX45RTMGDR

        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

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

    Microsoft.VisualStudio.Tools.Office.Runtime

        Assembly Version: 10.0.0.0

        Win32 Version: 10.0.40820.0

        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Runtime/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Runtime.dll

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

    System.Core

        Assembly Version: 4.0.0.0

        Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

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

    System

        Assembly Version: 4.0.0.0

        Win32 Version: 4.0.30319.18021 built by: FX45RTMGDR

        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

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

    Microsoft.VisualStudio.Tools.Applications.Hosting

        Assembly Version: 10.0.0.0

        Win32 Version: 10.0.40820.0

        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Hosting/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Hosting.dll

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

    Microsoft.VisualStudio.Tools.Applications.ServerDocument

        Assembly Version: 10.0.0.0

        Win32 Version: 10.0.40820.0

        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.ServerDocument/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.ServerDocument.dll

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

    Microsoft.VisualStudio.Tools.Applications.Runtime

        Assembly Version: 10.0.0.0

        Win32 Version: 10.0.40820.0

        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll

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

    System.Windows.Forms

        Assembly Version: 4.0.0.0

        Win32 Version: 4.0.30319.18036 built by: FX45RTMGDR

        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

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

    System.Drawing

        Assembly Version: 4.0.0.0

        Win32 Version: 4.0.30319.18021 built by: FX45RTMGDR

        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

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

    System.Deployment

        Assembly Version: 4.0.0.0

        Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll

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

    System.Configuration

        Assembly Version: 4.0.0.0

        Win32 Version: 4.0.30319.18060 built by: FX45RTMGDR

        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

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

    System.Xml

        Assembly Version: 4.0.0.0

        Win32 Version: 4.0.30319.18060 built by: FX45RTMGDR

        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

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

    System.Xml.Linq

        Assembly Version: 4.0.0.0

        Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll

    Please help.

    Thanks,

    Benj



    Wednesday, January 22, 2014 6:51 AM

Answers

All replies

  • Hello Benjamin,

    Microsoft Office applications can disable add-ins that behave unexpectedly. Soft disabling can occur when an add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable an add-in if it throws an unhandled exception while the Startup event handler is executing. When you re-enable a soft-disabled add-in, the application immediately attempts to load the add-in. If the problem that initially caused the application to soft disable the add-in has not been fixed, the application will soft disable the add-in again. Please read more about this in the How to: Re-enable an Add-in That Has Been Disabled article in MSDN.

    1. What changes did you make in the next build of add-in?
    2. Did you change anything in the trust center settings in Outlook? 
    3. Do you sign the manifest with a digital signature? You can read more about this in the How to: Sign Application and Deployment Manifests.

    Anyway, I'd recommend checking the list or common issues described in the Troubleshooting COM Add-In load failures article. Also I have just found a similar forum thread - Exception: Customization could not be loaded because the application domain could not be created.

    Finally, I'd suggest asking VSTO related questions in the Visual Studio Tools for Office (VSTO)  forum instead.

     

     

    Wednesday, January 22, 2014 10:56 AM
  • Hi Eugene,

    1. The changes made with the latest release of our Add-in were on the source code only. By the time when ClickOnce auto-update dialog appears, the add-in was already up-to-date (latest version) a day before and we didn't change any file from the Installation Folder URL (Web) since then. Another thing is that our add-in only updates during Outlook start-up (configured in Publish > Updates...) so why would the ClickOnce auto-update suddenly appears when Outlook has already been running for an hour or so and then disables our Add-in.

    2. No.

    3. Yes and we have a valid certificate.

    Thanks,

    Benjamin

    Tuesday, January 28, 2014 11:56 PM
  • Hi Eugene,

    Thank you for your reply. I have posted my question to Visual Studio Tools for Office (VSTO) forum as you suggested.

    Benj


    Wednesday, January 29, 2014 12:45 AM
  • Benjamin,

    Are you able to reproduce the issue with a newly created empty add-in project?

    Wednesday, January 29, 2014 3:19 PM