excel.dll.config is not used on addin startup c# RRS feed

  • Question

  • I have an addin created using vsto 2010. I am trying to add the app.config manually to the addins. The excel.dll.config is created in the target folder and I have also changed the manifest file properties to

    file:///C:\Program Files (x86)\Application\MyApp\Excel.vsto|vstolocal 
    But I am able to see the addin installed but the WCF calls are not working and also the log4net is working but referring to the Excel.dll.config.I don't want this idea where we adding the excel.exe.config manually to Office14 folder. Is there any other way where we can handle this? And also does this custom config added in the Office14 folder affects the other addins installed?


    • Edited by Roopini Friday, September 5, 2014 10:24 AM change
    Friday, September 5, 2014 10:22 AM

All replies

  • Hello Roopini,

    Please remember that you develop an add-in, not a standalone application which may have a config file isolated. To get things working out of the box, you have to use the config file of the application which is Excel in your case. And yes, the changes will be applied to all add-ins.

    As a workaround you may store the settings in a separate file included in the add-in installation package.

    Friday, September 5, 2014 1:19 PM
  • Does it also affect the other addin also? How to store the settings in the separate file and how to include that in the installation pack? The config always should go to where Excel.exe config?


    Saturday, September 6, 2014 3:29 PM
  • But if I create an custom setting file, how does the Excel addin knows to refer to this? does this addin configuration also affects the other built in addins or addins other than I created?


    Tuesday, September 9, 2014 6:50 AM
  • Hi Roopini,

    If you stored custom setting in another file such as notepad or Excel workbook, you need to read these settings by yourself. Since this is a application-level add-in, every workbook will load this add-in and all these settings are in used.

    Here are some articles for your reference:

    How to: Read Text from a File

    How To Use ADO.NET to Retrieve and Modify Records in an Excel Workbook With Visual Basic .NET

    Reading Excel From C#

    C# reading from Excel to Text using OleDb - limit at 255 columns



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, September 9, 2014 7:27 AM
  • I am referring to the wcf configurations. Since I am not able to use this config file for the service calls. Ans also I get some error in the temp folder 

    An error occurred loading a configuration file: Access to the path 'C:\Program Files (x86)\Application\My Application\bchabr21.tmp' is denied. (C:\Program Files (x86)\Application\My Application\MyAppExcel.dll.config) .


    • Edited by Roopini Tuesday, September 9, 2014 8:10 AM
    Tuesday, September 9, 2014 8:09 AM
  • Did you have a chance to customize the host application config file. Does it work as expected?

    As I already said, an add-in is not a standalone application. You need to use the host application config file to get things working out of the box. In other cases you have to read the data on your own.

    Wednesday, September 10, 2014 7:33 AM
  • Yes I have now placed the app.config in the AppData folder, but I am getting an error saying Endpoint not found exception.


    Thursday, September 11, 2014 4:21 AM