Is MEF a replacement for System.Addin? [duplicate]

2019-01-18 20:07发布

问题:

Possible Duplicate:
Choosing between MEF and MAF (System.AddIn)

Is the Managed Extensibility Framework a replacement for System.Addin? Or are they complementary?

回答1:

It is touched in the MSDN Forums here:

Comparison to the AddIn libraries?

And also by Krzysztof Cwalina in his blog on the release of MEF:

Managed Extensibility Framework

Summary: they live side by side.



回答2:

Short answer no it is not. System.Addin allows you to isolate add-ins in to a seprate app-domain / process. It also provides facilities for versioning. These capabilities are critical for many customers particularly large ISVs. MEF on the other hand is designed to be simple programming model for extensibility. The two can work together and complement each other.



回答3:

.. just two links for further reference:

  • SO question: Choosing between MEF and MAF (System.AddIn)
  • Kent Boogaart blog: MAF and MEF


回答4:

Just as a side note, some time ago I developed so called IsolatingCatalog, which is MEF catalog for providing part isolation. You can instruct it so that you parts are created in a separate app domain/process. WCF is used for IPC. Check it out here.