|
|
1
4
这样做可能最容易:
我不知道为什么
|
|
|
2
1
程序集可能是在“从上下文加载”中加载的,并且 Type.GetType() doesn't work with assemblies loaded in that context . MEF tries to load assemblies in the default context, but if that doesn't work it loads them in the Load-From context. |
|
|
3
0
This question has long been answered, but just in case someone stumbles upon this, here is my solution.
正如其他答案所指出的那样,问题是尽管程序集是通过MEF加载的,但一旦使用它,它就会再次加载。
在我的例子中,可以通过将插件程序集的位置添加到 probing path 应用程序的。
另一种解决方案(这是我最终所做的)是实现
另外:如果您的插件有任何依赖程序集,您必须使用这两个解决方案中的一个,否则在第一次使用这些依赖项时会得到一个fileNotFound异常。 |
|
|
Barta · WPF MVVM不更新视图 1 年前 |
|
|
Denis Ivanov · WPF控件在属性更改时不会更新 1 年前 |
|
|
KrzysiekYESS · 不知道如何绑定MVVM 2 年前 |
|
jason.kaisersmith · 无法通过绑定禁用条目 2 年前 |