1

I'm aware of the limitations of loading an assembly dynamically during run-time that prevents it from being unloaded. Instead it's been suggested that, if this is a requirement, that I should instead load modules in other application domains and then execute code across the domain boundries.

How can I ease this development process and work with this scenario? What tools or frameworks are available?

4

2 回答 2

0

MEF [1] 是否向您发送了正确的方向?或者你可以选择温莎城堡 [2],尽管我不需要卸载任何一个。

[1] http://code.msdn.microsoft.com/mef

[2] http://www.castleproject.org/container/index.html

于 2010-10-22T18:57:01.357 回答
0

这取决于您的“宿主”应用程序和动态加载的代码之间的交互有多复杂。如果它相当复杂,那么您可能想要使用完整的 System.AddIn 路线。如果您的交互相当简单,那么您可能应该只编写自己的类来处理程序集的加载和卸载。我已经为各种较小的项目做了很多次,所以如果有帮助的话,我可以发布代码。

于 2010-10-22T22:33:49.497 回答