Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is MEF or MEF2 baked into the .NET Framework?

Tags:

.net

mef

mef2

I am trying to understand MEF and I am seeing references to MEF and MEF 2.

This site lists MEF2 as being much faster than MEF (4.0).

I need to understand what I am talking about when most people say MEF.

So which is in the .NET Framework 4.5? MEF or MEF2?

like image 793
Vaccano Avatar asked Nov 02 '15 18:11

Vaccano


People also ask

Is there any documentation for MEF in the.NET Framework?

While the graduate course focused on MEF in the .NET Framework, I’m always keen to push as much of my architecture into the cross platform realms of .NET Core and .NET Standard, so naturally, I headed in that direction. Unfortunately it seems that while MEF is included in the .NET Standard APIs, it’s doesn’t have much documentation.

What is memef?

MEF is a part of the Microsoft .NET Framework, with types primarily under the System.ComponentModel.Composition.* namespaces.

Is MEF included in the WPF API?

Unfortunately it seems that while MEF is included in the .NET Standard APIs, it’s doesn’t have much documentation. Instead, I pulled together blog posts about MEF in .NET Core and .NET Framework and started writing some code.gist First, I started creating my projects. I created my app project as a WPF desktop app.

Are MEF extension components extensible?

In this way, extension components themselves are automatically extensible. MEF is an integral part of the .NET Framework 4, and is available wherever the .NET Framework is used. You can use MEF in your client applications, whether they use Windows Forms, WPF, or any other technology, or in server applications that use ASP.NET.


1 Answers

Well to make it even more confusing Microsoft released three versions of MEF using two only unique names: MEF and MEF2

  • System.ComponentModel.Composition.* MEF in .NET 4 (typically called just MEF), no support for CompositionScopes, ExportFactories, etc
  • System.ComponentModel.Composition.* MEF2 in .NET 4.5 (sometimes called MEF2 or MEF), support for composition scopes, ExportFactories
  • System.Compostion.* from independent package Microsoft.Composition lightweight version of MEF typically called MEF2

The benchmark site refers to lightweight MEF2 System.Compostion.* from Microsoft.Composition package.

like image 86
Grzegorz Banczak Avatar answered Oct 28 '22 19:10

Grzegorz Banczak