MEF in .NET 4.0

Feb 15, 2010 at 4:02 PM

Which all namespaces represent MEF in .NET 4.0?

I am reviewing .NET 4.0, and found following namespaces that cover MEF. If anyone can be more specific, will help understand .NET 4.0 usage for MEF very well.

System.AddIn
System.AddIn.Contract
System.AddIn.Hosting
System.AddIn.Pipeline

Thanks

Feb 15, 2010 at 4:15 PM

Everything you are looking at is call MAF or Managed AddIn Framework. It is about loading plug in components into an application's separate app-domain.

MEF is Managed Extensibility Framework. This is about resolving object references with 'magic'. I do not know that MEF will be part of .NET 4.0. I hope it will remain an open source project because its greates value is the open source code.

I wish MAF was also an open source code project.

Feb 15, 2010 at 4:26 PM
wszymanski wrote:

Everything you are looking at is call MAF or Managed AddIn Framework. It is about loading plug in components into an application's separate app-domain.

MEF is Managed Extensibility Framework. This is about resolving object references with 'magic'. I do not know that MEF will be part of .NET 4.0. I hope it will remain an open source project because its greates value is the open source code.

I wish MAF was also an open source code project.

 Thanks for quick reply, but you need to check the following url. It specifies MEF is an integral part of Microsoft .NET 4.0

http://msdn.microsoft.com/en-us/library/dd460648(VS.100).aspx#where_is_mef_available

 

Feb 15, 2010 at 4:26 PM

Wzymanski you are a little late to the party. We are already shipping in .NET 4.0 and SL 4.0 :-)

Glenn

Feb 15, 2010 at 4:28 PM

The motive behind this discussion was to identify the namespaces in .NEt 4.0 mapped (enhanced) to MEF beta 8.

I wish experts will give some insight into this.

Feb 15, 2010 at 4:36 PM

Not sure what you mean. System.ComponentModel.Composition is the root namespace for MEF in .NET 4.0, SL4 and our Codeplex drop. What did you need?

Feb 15, 2010 at 4:48 PM
gblock wrote:

Not sure what you mean. System.ComponentModel.Composition is the root namespace for MEF in .NET 4.0, SL4 and our Codeplex drop. What did you need?

 Thanks gblock, this is a bit of what I'm seeking here.

1. System.ComponentModel.Composition is root namespace for MEF.

Is there any other namespaces in Net 4.0, that cover MEF framework?

This is just to help qucikly map the knowledge of MEF to .NET 4.0 framework, and learn the enhancements.

Feb 15, 2010 at 4:52 PM
Edited Feb 15, 2010 at 4:57 PM

SL4 = Silverlight 4.0 (?)

( :-| I'm returning to MEF after 4 months. Working right now on VS2010 installation and adapting to new changes since .NET 3.5. MEF is my priority right now.)

Developer
Feb 16, 2010 at 9:26 PM

Yes SL4 = Silverlight 4.0

As for the namespaces, the primary namespace is System.ComponentModel.Composition there are some sub-namespaces as well and they all relate to MEF. Here is a quick overview of the namespaces of interest:

System.ComponentModel.Composition - Contains the attributes (Export/Import) and types needed to use the default attributed programming model and primarily used by component authors.
System.ComponentModel.Composition.Hosting - Contains things like the Container and Catalogs and primarily used by the application host author.
System.ComponentModel.Composition.Primitives - Contains the underlying building blocks that MEF is built upon and would generally one be needed by someone who wants to build a different programming model other than the attributed model.

There are some other misc sub-namespaces that are used for internal separation or advanced scenarios, generally unless you are doing something advanced the first two namespaces are the only ones you should care about.

Feb 17, 2010 at 7:35 AM

Thank you "weshaggard". the explaination is really clear.