【发布时间】:2014-11-13 09:41:04
【问题描述】:
所以我的目录目录设置如下所示:
DirectoryCatalog directoryCatalog = new DirectoryCatalog(@".\Plugins");
var catalog = new AggregateCatalog(directoryCatalog);
var container = new CompositionContainer(catalog);
container.ComposeParts(this);
这将在我的Plugins 文件夹中找到符合我的导入标准的任何.dll。现在为了防止我的插件中的引用冲突,我想将每个插件放在一个单独的文件夹中。
例如
插件 -> Plugin1 -> plugin1.dll
-> Plugin2 -> plugin2.dll
但是我的DirectoryCatalog 没有找到这些插件。是否可以实现这个或者我的插件库必须在指定的.\Plugins文件夹中
【问题讨论】: