It seems like most documentation for MEF is related to .NET Framework. It would be very helpful to provide details on the state of the .NET Core implementation. What's supported? What's changed? What's the roadmap?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@terrajobst is there any support or planned support for MEF on .NET Core?
MEF v1 is available for .NET Core/Standard via the System.ComponentModel.Composition NuGet package, which is also part of the Windows Compat Pack. However, MEF v1 also works cross-platform.
MEF v2 has always been available for .NET Core/Standard via the System.Composition NuGet package.
Ok, thanks for the info @terrajobst. Our content on MEF is not extensive but this probably should be moved under the .NET Guide then since it's not Framework specific.
Nice Framework!
Is there any up-to-date statement regarding MEF v1 lifecycle? Is it deprecated/EOL? Or is it still officially supported?
Same as the rest of .NET Core, so it's supported.
System.Composition (MEF v2) is in need of some examples. In fact, it could do with some documentation on how to use it as there's none available.
Any examples of System.Composition (MEF v2) ? I have read this article. The ConventionBuilder is inside System.Composition.Convention namespace. How about the others ?
Can anyone tell me which namespaces are involved in v2?
Even I am looking to have some documentation or samples of it's usage in .NET Core 2x or 3x. I have found something in this link - https://docs.microsoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support. Not sure if MEF team has any other roadmap for .NET core
https://docs.microsoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support is about using .NET Core DI - it doesn't use system.composition (MEF V2)
Here's some migration docs from MEF V1 to MEF V2 I found:
I have to second that MEF v2 docs are seriously lacking.
Is there at least comprehensive example code put out by Microsoft somewhere?
Any update on docs?
Most helpful comment
MEF v1 is available for .NET Core/Standard via the System.ComponentModel.Composition NuGet package, which is also part of the Windows Compat Pack. However, MEF v1 also works cross-platform.
MEF v2 has always been available for .NET Core/Standard via the System.Composition NuGet package.