none
Unable to load Outlook add-in user control on customer deployment when Outlook run without 'Run As administrator' RRS feed

  • Question

  • Hello,

    I am working on Outlook COM Add-in, which is deployed on Windows 10 (German locale) on customer setup. If I run Outlook application with 'Run as administrator' then everything works fine.

    But if I run Outlook without 'Run as administrator' then I get following exception.

    System.Windows.Markup.XamlParseException: Aktiveringen af konstruktøren på typen 'OfficePlugin.UserControlContact', som svarer til de angivne bindingsbegrænsninger, udløste en undtagelse. ---> System.IO.IOException: Ressourcen view/usercontrols/usercontrolcontact.xaml blev ikke fundet.

    I carried following tests on customer setup but no success.

    1. Install Outlook add-in by running installer as administrator

    2. Install Outlook add-in in custom folder , outside 'C:\Program files (x86)'folder.

    3. Reinstalled 'Visual Studio 2010 Tools for Office Runtime' manually

    I am unable to understand why Outlook add-in is unable to access the resource file from 'de-DE' folder(when run without 'Run as administrator'). Please help me on how should I troubleshoot this issue.

    Customer does not want to run Outlook as administrator.

    Regards,

    Nilesh

    System.Windows.Markup.XamlParseException: Aktiveringen af konstruktøren på typen 'OfficePlugin.UserControlContact', som svarer til de angivne bindingsbegrænsninger, udløste en undtagelse. ---> System.IO.IOException: Ressourcen view/usercontrols/usercontrolcontact.xaml blev ikke fundet.

       ved MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)

       ved System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)

       ved System.IO.Packaging.PackagePart.GetStream()

       ved System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)

    Wednesday, March 13, 2019 5:36 AM

All replies

  • Hello Nilesh,

    Why do use the Program Files folder as the target one? Do you deploy a per-machine add-in?

    Please remember that admin privileges are required to get the rights for changing or writing anything there. That's why you may experience such problems with your add-in.

    Program Files is intended to store files that do not change during run of application. Files stored there should be changed only during installation/update.

    Files to be changed during application run (profiles, settings etc.) should be stored "Application Data" directory in users folder.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Wednesday, March 13, 2019 2:57 PM