How to configure app.config for Addin class? RRS feed

  • Question

  • I have an addin developed and now i want to configure the log4net to this addin. I have configured the addin like Configuring the log4net

    The logs are not created in the target folder as mentioned. How can I do this? I have just made a trial to refer to my other project's app.config , it dint work. I also created a new Excel.exe.config and still it dint work.

    How can I do this?


    Tuesday, June 17, 2014 7:04 AM


All replies

  • Hello Roopini,

    What is the target folder of your add-in?

    You may find the Configuring log4net in a VSTO forum thread and Using log4net in VSTO  blog post helpful.

    • Marked as answer by Roopini Wednesday, June 18, 2014 9:28 AM
    Tuesday, June 17, 2014 11:11 AM
  • The solution folder is c drive and the target folder is Program FilesX86. The configuration for manifest file is [TARGETDIR]MyExcel.vsto|vstolocal . I have created a Excel.exe.config and have copied this file to ProgramFiles X86 -> Microsoft Office -> Office 14 and also have added

    [assembly: log4net.Config.XmlConfigurator(ConfigFile = "Excel.exe.config", Watch = true)] i the assembly info class. But still it seems not working.


    • Edited by Roopini Wednesday, June 18, 2014 9:20 AM info change
    Wednesday, June 18, 2014 9:17 AM
  • I changed this [assembly: log4net.Config.XmlConfigurator(ConfigFile = "Excel.exe.config", Watch = true)] to

    [assembly: log4net.Config.XmlConfigurator(Watch = true)] and now it seems to be working fine.

    Thanks Eugene.


    • Marked as answer by Roopini Wednesday, June 18, 2014 9:28 AM
    Wednesday, June 18, 2014 9:27 AM