integrate app.config [modified]
-
Hello CP, I'm currently messing around to build a plugin system and want to use subfolders. After a bit of searching I found that adding a <probing privatepath=""/> element to app.config allowed subfolder usage.
My only objection to this is that it is yet another file (one the user can edit :s) , my question is: Can I merge this configuration file with the exe or is there another way to do this? It would be preferable to put this in the manifest or something.
The first rule of CListCtrl is you do not talk about CListCtrl - kornman
modified on Sunday, August 28, 2011 11:13 AM
-
Hello CP, I'm currently messing around to build a plugin system and want to use subfolders. After a bit of searching I found that adding a <probing privatepath=""/> element to app.config allowed subfolder usage.
My only objection to this is that it is yet another file (one the user can edit :s) , my question is: Can I merge this configuration file with the exe or is there another way to do this? It would be preferable to put this in the manifest or something.
The first rule of CListCtrl is you do not talk about CListCtrl - kornman
modified on Sunday, August 28, 2011 11:13 AM
You can modify the configuration during runtime. However whether it uses it to pick up assemblies is a different point. Myself I don't see the utility. To create a plugin system you need to load from somewhere dynamically. That is the initial path. There isn't much point in having the framework (the loader) to provide options that require the plugin to follow a loading scheme that for most plugins shouldn't matter. So if the primary assembly is in director 'Bdir' then the plugin will probably have dependent assemblies in that directory and no other. And the standard assembly load mechanism will find those because the primary assembly was loaded from that. But further note that the point of configuration is specifically so that users can modify it. And a plugin system is pretty much by it very nature suggesting that users are going to be responsible for it. So either the system is simple to begin with or one must assume that the users are intelligent enough to deal with it.