natemcmaster / DotNetCorePlugins

.NET Core library for dynamically loading code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Whats the difference between this and MEF?

JerryLiew opened this issue · comments

it looks like a good repository,Can anyone explain the difference between this and MEF? thanks a lot.

Someone else had this question too. Here was my answer: https://natemcmaster.com/blog/2018/07/25/netcore-plugins/#comment-4293147893

System.Composition (MEF) serves another purpose. The plugins API answers the question "how do I load assemblies", and MEF answers the question about "how to I wire together types from various assemblies". You could use MEF on top of the plugins API. Someone wrote a sample of this here: https://github.com/nathanaw/DotNetCorePlugins/blob/mef-plugin-sample/samples/mef/MefWebApp/Mef/PluginCatalog.cs