none
Could not find file 'C:\Program Files\Microsoft Office\Office12\Excel.exe.config"

    Question

  • Hi

    I am using VSTO 2010 and created excel addins. The addin working fine with code and Visual studio setup. But when the installer created by Installer team ( Install sheild) then problem occcurs. The addin loaded successfully but getting the below error when click on any operation:

    "Could not find file 'C:\Program Files\Microsoft Office\Office12\Excel.exe.config"

    Please let me know if you have any findings. 

    Thanks.

    S

    Wednesday, April 25, 2012 10:28 AM

Answers

  • The issue wasn't resolved with Addins window installer.

    Finally I created a ClickOnce Installer and deployed on server. Now using the clickonce installer the issue is not reproducible on client machines.

    Thanks

    • Marked as answer by S San Tuesday, May 29, 2012 4:40 AM
    Tuesday, May 29, 2012 4:40 AM

All replies

  • usually this means that somewhere in your code you use configuration classes to open exe config, which of course does not exist. I would suggest moving away from storing data in normal config files/classes and move toward simple txt/xml files and read then by yourself (json/xml serialization).
    Wednesday, April 25, 2012 12:17 PM
  • Hi San,

    Thanks for posting in the MSDN Forum.

    I suppose you use

    System.Configuration.ConfigurationManager.OpenExeConfiguration

    to access your configuration in your add-in application and all works fine on your develop environment, it just doesn't work on deployment machine. Is it right?

    I would recommend you use following snippet instead of that:

    System.Configuration.ConfigurationManager
                    .OpenExeConfiguration(AppDomain.CurrentDomain.SetupInformation
                    .ConfigurationFile.Replace(".config",""));

    I hope it can help you.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Tom_Xu_WXModerator Thursday, May 03, 2012 8:21 AM
    • Unmarked as answer by S San Friday, May 04, 2012 9:37 AM
    Thursday, April 26, 2012 5:00 AM
  • Hi Tom,

    I tried but it's not working. same error exists.

    Friday, May 04, 2012 9:38 AM
  • The issue wasn't resolved with Addins window installer.

    Finally I created a ClickOnce Installer and deployed on server. Now using the clickonce installer the issue is not reproducible on client machines.

    Thanks

    • Marked as answer by S San Tuesday, May 29, 2012 4:40 AM
    Tuesday, May 29, 2012 4:40 AM