locked
Config File for Dynamically Loaded Assembly RRS feed

  • Question

  • Hi, I have an application that loads multiple plugins that require configuration. However, it seems that the dynamically loaded assemblies ignore their config files and I can't see why.

    Is there some way I can put the plugin configs within the host application's config file or is there a step that I'm missing to get the plugins to recognise their own configs?

     

    Thanks

    EDIT:/ I have found this http://stackoverflow.com/questions/838964/c-sharp-plugin-to-use-its-own-app-config but I do not know what to put in the host application's app.config file. The plugins use a common interface so I would need to be able to identify the individual assembly. Is this possible?
    • Edited by Luke_UK Friday, December 16, 2011 3:28 PM Added information
    Friday, December 16, 2011 2:40 PM

Answers

  • Conclusion: This is impossible because config files do not work.
    • Marked as answer by Luke_UK Tuesday, December 20, 2011 11:16 AM
    Tuesday, December 20, 2011 11:16 AM

All replies

  • If you have configuation file for a DLL, it will be ignored. So, what I suggest you is merge your plugin's configuration into host application's configuration file and let the plugin refere the host app's config file.

     


    Please mark this post as answer if it solved your problem. Happy Programming!
    Friday, December 16, 2011 4:19 PM
  • Hello Luke_UK,

    I have posted a solution for your situation on another forum. If you go through the entire thread, it might help you. I am posting the link here.

    Friday, December 16, 2011 4:22 PM
  • What exactly do I put in the host's config file? This is where I'm stuck.

    I've tried adding the section name and then copying the relevant bits from the DLL's configuration into the host's config file but it still didn't pick up the values. Could you please point me at an example or show me how to do this?

     

    Thanks

    Monday, December 19, 2011 2:10 PM
  • Conclusion: This is impossible because config files do not work.
    • Marked as answer by Luke_UK Tuesday, December 20, 2011 11:16 AM
    Tuesday, December 20, 2011 11:16 AM